From b4adcd8daf12417c3bd325f93d603334702b2a8a Mon Sep 17 00:00:00 2001 From: Rafael Vasquez Date: Fri, 17 Nov 2023 17:21:52 -0500 Subject: [PATCH] fix: Specify and link python38 (#458) 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 --- Dockerfile.develop | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile.develop b/Dockerfile.develop index c7b12b14..46ee1356 100644 --- a/Dockerfile.develop +++ b/Dockerfile.develop @@ -36,18 +36,20 @@ ENV HOME=/root WORKDIR /workspace # 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 \ jq \ + 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 # First download and extract older dist of kubebuilder which includes required etcd, kube-apiserver and kubectl binaries # Then download and overwrite kubebuilder binary with desired/latest version