File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ ARG DEBIAN_FRONTEND=noninteractive
1515RUN set -eux; \
1616 apt-get update; \
1717 apt-get install -y --no-install-recommends \
18- python3.11 python3-pip python3 .11-venv; \
18+ python3.11 python3.11-venv python3-pip ; \
1919 apt-get clean; \
2020 rm -rf /var/lib/apt/lists/*
2121
@@ -27,8 +27,11 @@ COPY --from=py310 /usr/local/bin/ /usr/local/bin/
2727COPY --from=py312 /usr/local/lib/ /usr/local/lib/
2828COPY --from=py312 /usr/local/bin/ /usr/local/bin/
2929
30- # Make explicit version shims available in /usr/bin
31- RUN ln -sf /usr/local/bin/python3.10 /usr/bin/python3.10 && \
32- ln -sf /usr/local/bin/python3.12 /usr/bin/python3.12 && \
33- ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3.10 && \
34- ln -sf /usr/local/bin/pip3.12 /usr/bin/pip3.12
30+ # Make explicit version shims available in /usr/bin, and remove conflicting shims in /usr/local/bin
31+ RUN set -eux; \
32+ for shim in python3.10 python3.12 pip3.10 pip3.12; do \
33+ ln -sf "/usr/local/bin/$shim" "/usr/bin/$shim" ; \
34+ done; \
35+ for shim in pip pip3 idle3 pydoc3 2to3 python-config python3-config; do \
36+ rm -f "/usr/local/bin/$shim" ; \
37+ done
You can’t perform that action at this time.
0 commit comments