diff --git a/Dockerfile.develop.ci b/Dockerfile.develop.ci index ff9ef620..718a44bb 100644 --- a/Dockerfile.develop.ci +++ b/Dockerfile.develop.ci @@ -36,17 +36,20 @@ ENV HOME=/go WORKDIR /go/src/github.com/opendatahub-io/modelmesh-serving/ # Install build and dev tools -RUN --mount=type=cache,target=${HOME}/.cache/dnf:rw \ - dnf install --setopt=cachedir=${HOME}/.cache/dnf -y --nodocs \ - python3 \ - python3-pip \ +# 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 \ nodejs \ - jq + 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=${HOME}/.cache/pip -RUN --mount=type=cache,target=${HOME}/.cache/pip \ - pip3 install pre-commit +ENV PIP_CACHE_DIR=/root/.cache/pip +RUN --mount=type=cache,target=/root/.cache/pip \ + 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