diff --git a/3.10/alpine3.19/Dockerfile b/3.10/alpine3.19/Dockerfile index df5dd811b..4613aaa72 100644 --- a/3.10/alpine3.19/Dockerfile +++ b/3.10/alpine3.19/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.19 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.15 -ENV PYTHON_SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.10.15 +ENV PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 RUN set -eux; \ \ @@ -90,7 +90,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -98,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -106,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.10/alpine3.20/Dockerfile b/3.10/alpine3.20/Dockerfile index 330b28c17..4c2999d60 100644 --- a/3.10/alpine3.20/Dockerfile +++ b/3.10/alpine3.20/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.20 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.15 -ENV PYTHON_SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.10.15 +ENV PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 RUN set -eux; \ \ @@ -90,7 +90,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -98,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -106,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.10/bookworm/Dockerfile b/3.10/bookworm/Dockerfile index 2fd89a19c..f4d4c6766 100644 --- a/3.10/bookworm/Dockerfile +++ b/3.10/bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bookworm # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.15 -ENV PYTHON_SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.10.15 +ENV PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 RUN set -eux; \ \ @@ -60,7 +60,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -68,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -82,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.10/bullseye/Dockerfile b/3.10/bullseye/Dockerfile index bbb175fff..8e96092c0 100644 --- a/3.10/bullseye/Dockerfile +++ b/3.10/bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bullseye # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.15 -ENV PYTHON_SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.10.15 +ENV PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 RUN set -eux; \ \ @@ -60,7 +60,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -68,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -82,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.10/slim-bookworm/Dockerfile b/3.10/slim-bookworm/Dockerfile index 984b7a8d0..4c22f282c 100644 --- a/3.10/slim-bookworm/Dockerfile +++ b/3.10/slim-bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bookworm-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.15 -ENV PYTHON_SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.10.15 +ENV PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 RUN set -eux; \ \ @@ -87,7 +87,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -95,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -103,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.10/slim-bullseye/Dockerfile b/3.10/slim-bullseye/Dockerfile index 3342d27cc..4ff0ffde6 100644 --- a/3.10/slim-bullseye/Dockerfile +++ b/3.10/slim-bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bullseye-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.10.15 -ENV PYTHON_SHA256 aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.10.15 +ENV PYTHON_SHA256=aab0950817735172601879872d937c1e4928a57c409ae02369ec3d91dccebe79 RUN set -eux; \ \ @@ -87,7 +87,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -95,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -103,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.11/alpine3.19/Dockerfile b/3.11/alpine3.19/Dockerfile index 0de2b82ed..242da49a1 100644 --- a/3.11/alpine3.19/Dockerfile +++ b/3.11/alpine3.19/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.19 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.10 -ENV PYTHON_SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.11.10 +ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 RUN set -eux; \ \ @@ -90,7 +90,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -98,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -106,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.11/alpine3.20/Dockerfile b/3.11/alpine3.20/Dockerfile index 914e34edc..e45fd3f06 100644 --- a/3.11/alpine3.20/Dockerfile +++ b/3.11/alpine3.20/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.20 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.10 -ENV PYTHON_SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.11.10 +ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 RUN set -eux; \ \ @@ -90,7 +90,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -98,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -106,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.11/bookworm/Dockerfile b/3.11/bookworm/Dockerfile index 0dbd36f3e..4e9292558 100644 --- a/3.11/bookworm/Dockerfile +++ b/3.11/bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bookworm # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.10 -ENV PYTHON_SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.11.10 +ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 RUN set -eux; \ \ @@ -60,7 +60,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -68,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -82,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.11/bullseye/Dockerfile b/3.11/bullseye/Dockerfile index 4bdf869c1..728bd38b9 100644 --- a/3.11/bullseye/Dockerfile +++ b/3.11/bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bullseye # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.10 -ENV PYTHON_SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.11.10 +ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 RUN set -eux; \ \ @@ -60,7 +60,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -68,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -82,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.11/slim-bookworm/Dockerfile b/3.11/slim-bookworm/Dockerfile index 53dd3e913..613f9fc81 100644 --- a/3.11/slim-bookworm/Dockerfile +++ b/3.11/slim-bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bookworm-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.10 -ENV PYTHON_SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.11.10 +ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 RUN set -eux; \ \ @@ -87,7 +87,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -95,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -103,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.11/slim-bullseye/Dockerfile b/3.11/slim-bullseye/Dockerfile index ffc5971dd..56ab16b73 100644 --- a/3.11/slim-bullseye/Dockerfile +++ b/3.11/slim-bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bullseye-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D -ENV PYTHON_VERSION 3.11.10 -ENV PYTHON_SHA256 07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 +ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D +ENV PYTHON_VERSION=3.11.10 +ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372 RUN set -eux; \ \ @@ -87,7 +87,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -95,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -103,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.12/alpine3.19/Dockerfile b/3.12/alpine3.19/Dockerfile index 7cfbf1d31..a5da67954 100644 --- a/3.12/alpine3.19/Dockerfile +++ b/3.12/alpine3.19/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.19 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.7 -ENV PYTHON_SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.7 +ENV PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 RUN set -eux; \ \ @@ -90,7 +90,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -98,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -106,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.12/alpine3.20/Dockerfile b/3.12/alpine3.20/Dockerfile index 9a984f575..3ab44d986 100644 --- a/3.12/alpine3.20/Dockerfile +++ b/3.12/alpine3.20/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.20 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.7 -ENV PYTHON_SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.7 +ENV PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 RUN set -eux; \ \ @@ -90,7 +90,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -98,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -106,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.12/bookworm/Dockerfile b/3.12/bookworm/Dockerfile index 40a5e46ce..ffdede6a3 100644 --- a/3.12/bookworm/Dockerfile +++ b/3.12/bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bookworm # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.7 -ENV PYTHON_SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.7 +ENV PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 RUN set -eux; \ \ @@ -60,7 +60,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -68,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -82,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.12/bullseye/Dockerfile b/3.12/bullseye/Dockerfile index a0c98d45a..128671400 100644 --- a/3.12/bullseye/Dockerfile +++ b/3.12/bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bullseye # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.7 -ENV PYTHON_SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.7 +ENV PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 RUN set -eux; \ \ @@ -60,7 +60,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -68,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -82,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.12/slim-bookworm/Dockerfile b/3.12/slim-bookworm/Dockerfile index 0fb84592f..93ed50a2b 100644 --- a/3.12/slim-bookworm/Dockerfile +++ b/3.12/slim-bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bookworm-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.7 -ENV PYTHON_SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.7 +ENV PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 RUN set -eux; \ \ @@ -87,7 +87,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -95,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -103,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.12/slim-bullseye/Dockerfile b/3.12/slim-bullseye/Dockerfile index 34761e37e..a30effca2 100644 --- a/3.12/slim-bullseye/Dockerfile +++ b/3.12/slim-bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bullseye-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.7 -ENV PYTHON_SHA256 24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.12.7 +ENV PYTHON_SHA256=24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 RUN set -eux; \ \ @@ -87,7 +87,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -95,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -103,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.13/alpine3.19/Dockerfile b/3.13/alpine3.19/Dockerfile index 814a33818..908949863 100644 --- a/3.13/alpine3.19/Dockerfile +++ b/3.13/alpine3.19/Dockerfile @@ -7,7 +7,7 @@ FROM alpine:3.19 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # runtime dependencies RUN set -eux; \ @@ -16,9 +16,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.13.0 -ENV PYTHON_SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.13.0 +ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d RUN set -eux; \ \ @@ -82,10 +82,14 @@ RUN set -eux; \ # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ +# Workaround https://github.com/python/cpython/issues/125067 + sed -i -E \ + -e 's:(\$\(LLVM_PROF_FILE\) \$\(RUNSHARED\) ./\$\(BUILDPYTHON\) \$\(PROFILE_TASK\)):\1 || true:' \ + -e 's:TESTTIMEOUT=$:TESTTIMEOUT= 1200:' Makefile \ + ; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -93,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -101,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.13/alpine3.20/Dockerfile b/3.13/alpine3.20/Dockerfile index dd8642626..d42f0543a 100644 --- a/3.13/alpine3.20/Dockerfile +++ b/3.13/alpine3.20/Dockerfile @@ -7,7 +7,7 @@ FROM alpine:3.20 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # runtime dependencies RUN set -eux; \ @@ -16,9 +16,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.13.0 -ENV PYTHON_SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.13.0 +ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d RUN set -eux; \ \ @@ -82,10 +82,14 @@ RUN set -eux; \ # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ +# Workaround https://github.com/python/cpython/issues/125067 + sed -i -E \ + -e 's:(\$\(LLVM_PROF_FILE\) \$\(RUNSHARED\) ./\$\(BUILDPYTHON\) \$\(PROFILE_TASK\)):\1 || true:' \ + -e 's:TESTTIMEOUT=$:TESTTIMEOUT= 1200:' Makefile \ + ; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -93,7 +97,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -101,12 +104,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.13/bookworm/Dockerfile b/3.13/bookworm/Dockerfile index 93cacf9af..8da7beeca 100644 --- a/3.13/bookworm/Dockerfile +++ b/3.13/bookworm/Dockerfile @@ -7,7 +7,7 @@ FROM buildpack-deps:bookworm # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # runtime dependencies RUN set -eux; \ @@ -19,9 +19,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.13.0 -ENV PYTHON_SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.13.0 +ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d RUN set -eux; \ \ @@ -55,7 +55,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -63,7 +62,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -77,12 +75,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.13/bullseye/Dockerfile b/3.13/bullseye/Dockerfile index 9d4aab748..1f656db3e 100644 --- a/3.13/bullseye/Dockerfile +++ b/3.13/bullseye/Dockerfile @@ -7,7 +7,7 @@ FROM buildpack-deps:bullseye # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # runtime dependencies RUN set -eux; \ @@ -19,9 +19,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.13.0 -ENV PYTHON_SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.13.0 +ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d RUN set -eux; \ \ @@ -52,10 +52,14 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ +# Workaround https://github.com/python/cpython/issues/125067 + sed -i -E \ + -e 's:(\$\(LLVM_PROF_FILE\) \$\(RUNSHARED\) ./\$\(BUILDPYTHON\) \$\(PROFILE_TASK\)):\1 || true:' \ + -e 's:TESTTIMEOUT=$:TESTTIMEOUT= 1200:' Makefile \ + ; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -63,7 +67,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -77,12 +80,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.13/slim-bookworm/Dockerfile b/3.13/slim-bookworm/Dockerfile index 6573d6f94..2c88e2f06 100644 --- a/3.13/slim-bookworm/Dockerfile +++ b/3.13/slim-bookworm/Dockerfile @@ -7,7 +7,7 @@ FROM debian:bookworm-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # runtime dependencies RUN set -eux; \ @@ -19,9 +19,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.13.0 -ENV PYTHON_SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.13.0 +ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d RUN set -eux; \ \ @@ -82,7 +82,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -90,7 +89,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -98,12 +96,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.13/slim-bullseye/Dockerfile b/3.13/slim-bullseye/Dockerfile index 55795e1da..708d0507a 100644 --- a/3.13/slim-bullseye/Dockerfile +++ b/3.13/slim-bullseye/Dockerfile @@ -7,7 +7,7 @@ FROM debian:bullseye-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # runtime dependencies RUN set -eux; \ @@ -19,9 +19,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.13.0 -ENV PYTHON_SHA256 086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d +ENV GPG_KEY=7169605F62C751356D054A26A821E680E5FA6305 +ENV PYTHON_VERSION=3.13.0 +ENV PYTHON_SHA256=086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d RUN set -eux; \ \ @@ -79,10 +79,14 @@ RUN set -eux; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ +# Workaround https://github.com/python/cpython/issues/125067 + sed -i -E \ + -e 's:(\$\(LLVM_PROF_FILE\) \$\(RUNSHARED\) ./\$\(BUILDPYTHON\) \$\(PROFILE_TASK\)):\1 || true:' \ + -e 's:TESTTIMEOUT=$:TESTTIMEOUT= 1200:' Makefile \ + ; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -90,7 +94,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -98,12 +101,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.9/alpine3.19/Dockerfile b/3.9/alpine3.19/Dockerfile index 1163933f8..b86b08055 100644 --- a/3.9/alpine3.19/Dockerfile +++ b/3.9/alpine3.19/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.19 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 -ENV PYTHON_SHA256 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION=3.9.20 +ENV PYTHON_SHA256=6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c RUN set -eux; \ \ @@ -89,7 +89,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -97,7 +96,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -105,12 +103,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.9/alpine3.20/Dockerfile b/3.9/alpine3.20/Dockerfile index 00a3b9a64..a891fe7c9 100644 --- a/3.9/alpine3.20/Dockerfile +++ b/3.9/alpine3.20/Dockerfile @@ -7,12 +7,12 @@ FROM alpine:3.20 # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -21,9 +21,9 @@ RUN set -eux; \ tzdata \ ; -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 -ENV PYTHON_SHA256 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION=3.9.20 +ENV PYTHON_SHA256=6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c RUN set -eux; \ \ @@ -89,7 +89,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -97,7 +96,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -105,12 +103,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ | tr ',' '\n' \ diff --git a/3.9/bookworm/Dockerfile b/3.9/bookworm/Dockerfile index 9180a988e..469fb40e4 100644 --- a/3.9/bookworm/Dockerfile +++ b/3.9/bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bookworm # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 -ENV PYTHON_SHA256 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION=3.9.20 +ENV PYTHON_SHA256=6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c RUN set -eux; \ \ @@ -59,7 +59,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -67,7 +66,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -81,12 +79,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.9/bullseye/Dockerfile b/3.9/bullseye/Dockerfile index 816a80ba8..bf9ff0168 100644 --- a/3.9/bullseye/Dockerfile +++ b/3.9/bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM buildpack-deps:bullseye # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 -ENV PYTHON_SHA256 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION=3.9.20 +ENV PYTHON_SHA256=6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c RUN set -eux; \ \ @@ -59,7 +59,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -67,7 +66,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -81,12 +79,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.9/slim-bookworm/Dockerfile b/3.9/slim-bookworm/Dockerfile index f6c0daa43..e1354872d 100644 --- a/3.9/slim-bookworm/Dockerfile +++ b/3.9/slim-bookworm/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bookworm-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 -ENV PYTHON_SHA256 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION=3.9.20 +ENV PYTHON_SHA256=6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c RUN set -eux; \ \ @@ -86,7 +86,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -94,7 +93,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -102,12 +100,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \ diff --git a/3.9/slim-bullseye/Dockerfile b/3.9/slim-bullseye/Dockerfile index 37ce11eb8..d77b9d7eb 100644 --- a/3.9/slim-bullseye/Dockerfile +++ b/3.9/slim-bullseye/Dockerfile @@ -7,12 +7,12 @@ FROM debian:bullseye-slim # ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH +ENV PATH=/usr/local/bin:$PATH # cannot remove LANG even though https://bugs.python.org/issue19846 is fixed # last attempted removal of LANG broke many users: # https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 +ENV LANG=C.UTF-8 # runtime dependencies RUN set -eux; \ @@ -24,9 +24,9 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/* -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 -ENV PYTHON_SHA256 6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c +ENV GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 +ENV PYTHON_VERSION=3.9.20 +ENV PYTHON_SHA256=6b281279efd85294d2d6993e173983a57464c0133956fbbb5536ec9646beaf0c RUN set -eux; \ \ @@ -86,7 +86,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ ; \ # https://github.com/docker-library/python/issues/784 # prevent accidental usage of a system installed libpython of the same version @@ -94,7 +93,6 @@ RUN set -eux; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ python \ ; \ make install; \ @@ -102,12 +100,9 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/python; \ \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ + find /usr/local -type d \( -name test -o -name idle_test -o -name __pycache__ \) -exec rm -rf '{}' +; \ + find /usr/local -type f -name libpython3*.a -delete; \ + find /usr/local -type f -name *test*.so -delete; \ \ ldconfig; \ \