Skip to content

Commit b4adcd8

Browse files
authored
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 <[email protected]>
1 parent eb4bf29 commit b4adcd8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile.develop

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@ ENV HOME=/root
3636
WORKDIR /workspace
3737

3838
# Install build and dev tools
39+
# NOTE: Require python38 to install pre-commit
3940
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
4041
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
41-
python3 \
42-
python3-pip \
4342
nodejs \
4443
jq \
44+
python38 \
45+
&& ln -sf /usr/bin/python3 /usr/bin/python \
46+
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
4547
&& true
4648

4749
# Install pre-commit
4850
ENV PIP_CACHE_DIR=/root/.cache/pip
4951
RUN --mount=type=cache,target=/root/.cache/pip \
50-
pip3 install pre-commit
52+
pip install pre-commit
5153

5254
# First download and extract older dist of kubebuilder which includes required etcd, kube-apiserver and kubectl binaries
5355
# Then download and overwrite kubebuilder binary with desired/latest version

0 commit comments

Comments
 (0)