Skip to content

Commit cd8d0f5

Browse files
authored
fix: Specify Python 3.8 in Dockerfile (#71)
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 ea17f9e commit cd8d0f5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@ USER root
2424
ENV HOME=/root
2525

2626
# Install build and dev tools
27+
# NOTE: Require python38 to install pre-commit
2728
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
2829
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
29-
python3 \
30-
python3-pip \
3130
nodejs \
31+
python38 \
32+
&& ln -sf /usr/bin/python3 /usr/bin/python \
33+
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
3234
&& true
3335

3436
# Install pre-commit
3537
ENV PIP_CACHE_DIR=/root/.cache/pip
3638
RUN --mount=type=cache,target=/root/.cache/pip \
37-
pip3 install pre-commit
39+
pip install pre-commit
3840

3941
# When using the BuildKit backend, Docker predefines a set of ARG variables with
4042
# information on the platform of the node performing the build (build platform)

0 commit comments

Comments
 (0)