From bc3b7c18818cc02ea8803319139c4e3527cac49e Mon Sep 17 00:00:00 2001 From: Rafael Vasquez Date: Fri, 17 Nov 2023 16:39:44 -0500 Subject: [PATCH] fix: Specify Python 3.8 in Dockerfile (#34) Specify and link python38 to fix build/test failures due to the wrong Python version (3.6) being used from base image. --------- Signed-off-by: Rafael Vasquez Signed-off-by: Spolti --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf6bad8..742acbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,17 +24,19 @@ USER root ENV HOME=/root # Install build and dev tools +# NOTE: Require python38 to install pre-commit RUN --mount=type=cache,target=/root/.cache/dnf:rw \ dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \ - python3 \ - python3-pip \ - nodejs \ + nodejs \ + python38 \ + && ln -sf /usr/bin/python3 /usr/bin/python \ + && ln -sf /usr/bin/pip3 /usr/bin/pip \ && true # Install pre-commit ENV PIP_CACHE_DIR=/root/.cache/pip RUN --mount=type=cache,target=/root/.cache/pip \ - pip3 install pre-commit + pip install pre-commit # When using the BuildKit backend, Docker predefines a set of ARG variables with # information on the platform of the node performing the build (build platform)