diff --git a/3.10/alpine3.20/Dockerfile b/3.10/alpine3.20/Dockerfile index 0fed3b855..06909ce36 100644 --- a/3.10/alpine3.20/Dockerfile +++ b/3.10/alpine3.20/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.10/alpine3.21/Dockerfile b/3.10/alpine3.21/Dockerfile index bde84e689..c7c28e6d7 100644 --- a/3.10/alpine3.21/Dockerfile +++ b/3.10/alpine3.21/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.10/bookworm/Dockerfile b/3.10/bookworm/Dockerfile index 365c28eb3..d2ef270ad 100644 --- a/3.10/bookworm/Dockerfile +++ b/3.10/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.10/slim-bookworm/Dockerfile b/3.10/slim-bookworm/Dockerfile index 28ea16618..a3719adc5 100644 --- a/3.10/slim-bookworm/Dockerfile +++ b/3.10/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,8 +113,9 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.10/slim-bullseye/Dockerfile b/3.10/slim-trixie/Dockerfile similarity index 91% rename from 3.10/slim-bullseye/Dockerfile rename to 3.10/slim-trixie/Dockerfile index a8758f729..d8394cd8c 100644 --- a/3.10/slim-bullseye/Dockerfile +++ b/3.10/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.10.17 @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,13 +113,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.10/bullseye/Dockerfile b/3.10/trixie/Dockerfile similarity index 96% rename from 3.10/bullseye/Dockerfile rename to 3.10/trixie/Dockerfile index df9e90582..2c2617b3a 100644 --- a/3.10/bullseye/Dockerfile +++ b/3.10/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.10.17 @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/alpine3.20/Dockerfile b/3.11/alpine3.20/Dockerfile index 5d5a0be1a..45e5f86e2 100644 --- a/3.11/alpine3.20/Dockerfile +++ b/3.11/alpine3.20/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/alpine3.21/Dockerfile b/3.11/alpine3.21/Dockerfile index 78e40d489..aede049b1 100644 --- a/3.11/alpine3.21/Dockerfile +++ b/3.11/alpine3.21/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/bookworm/Dockerfile b/3.11/bookworm/Dockerfile index f6a7a9a40..fcd07ae91 100644 --- a/3.11/bookworm/Dockerfile +++ b/3.11/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/slim-bookworm/Dockerfile b/3.11/slim-bookworm/Dockerfile index 3634bae14..928bb6d46 100644 --- a/3.11/slim-bookworm/Dockerfile +++ b/3.11/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,8 +113,9 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.11/slim-bullseye/Dockerfile b/3.11/slim-trixie/Dockerfile similarity index 91% rename from 3.11/slim-bullseye/Dockerfile rename to 3.11/slim-trixie/Dockerfile index e89207c9d..214e02f1d 100644 --- a/3.11/slim-bullseye/Dockerfile +++ b/3.11/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.11.12 @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,13 +113,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.11/bullseye/Dockerfile b/3.11/trixie/Dockerfile similarity index 96% rename from 3.11/bullseye/Dockerfile rename to 3.11/trixie/Dockerfile index 4b7d3f217..9b594c995 100644 --- a/3.11/bullseye/Dockerfile +++ b/3.11/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.11.12 @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/alpine3.20/Dockerfile b/3.12/alpine3.20/Dockerfile index 9519e47a9..84aeaa354 100644 --- a/3.12/alpine3.20/Dockerfile +++ b/3.12/alpine3.20/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/alpine3.21/Dockerfile b/3.12/alpine3.21/Dockerfile index 9b2b2fe71..f892e733a 100644 --- a/3.12/alpine3.21/Dockerfile +++ b/3.12/alpine3.21/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/bookworm/Dockerfile b/3.12/bookworm/Dockerfile index 3c5dadda8..7bfce5c8a 100644 --- a/3.12/bookworm/Dockerfile +++ b/3.12/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/slim-bookworm/Dockerfile b/3.12/slim-bookworm/Dockerfile index f476f736a..16a822420 100644 --- a/3.12/slim-bookworm/Dockerfile +++ b/3.12/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -131,8 +131,9 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.12/slim-bullseye/Dockerfile b/3.12/slim-trixie/Dockerfile similarity index 92% rename from 3.12/slim-bullseye/Dockerfile rename to 3.12/slim-trixie/Dockerfile index 1e5f18c20..f840d5303 100644 --- a/3.12/slim-bullseye/Dockerfile +++ b/3.12/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.12.10 @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -131,13 +131,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.12/bullseye/Dockerfile b/3.12/trixie/Dockerfile similarity index 96% rename from 3.12/bullseye/Dockerfile rename to 3.12/trixie/Dockerfile index db27cbbe8..dbb406fbd 100644 --- a/3.12/bullseye/Dockerfile +++ b/3.12/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.12.10 @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/alpine3.20/Dockerfile b/3.13/alpine3.20/Dockerfile index c3b9eb310..7093f6dad 100644 --- a/3.13/alpine3.20/Dockerfile +++ b/3.13/alpine3.20/Dockerfile @@ -71,7 +71,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/alpine3.21/Dockerfile b/3.13/alpine3.21/Dockerfile index c289fda11..79ec12a0e 100644 --- a/3.13/alpine3.21/Dockerfile +++ b/3.13/alpine3.21/Dockerfile @@ -71,7 +71,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/bookworm/Dockerfile b/3.13/bookworm/Dockerfile index 4a3f8a2b1..49f7fef55 100644 --- a/3.13/bookworm/Dockerfile +++ b/3.13/bookworm/Dockerfile @@ -45,7 +45,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/slim-bookworm/Dockerfile b/3.13/slim-bookworm/Dockerfile index 15a408ab7..624a3ceac 100644 --- a/3.13/slim-bookworm/Dockerfile +++ b/3.13/slim-bookworm/Dockerfile @@ -70,7 +70,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -126,8 +126,9 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.13/slim-bullseye/Dockerfile b/3.13/slim-trixie/Dockerfile similarity index 91% rename from 3.13/slim-bullseye/Dockerfile rename to 3.13/slim-trixie/Dockerfile index 09ba3b8c2..32a5ee8de 100644 --- a/3.13/slim-bullseye/Dockerfile +++ b/3.13/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.13.3 @@ -70,7 +70,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -126,13 +126,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.13/bullseye/Dockerfile b/3.13/trixie/Dockerfile similarity index 96% rename from 3.13/bullseye/Dockerfile rename to 3.13/trixie/Dockerfile index 1267fa3e6..76c3d171f 100644 --- a/3.13/bullseye/Dockerfile +++ b/3.13/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.13.3 @@ -45,7 +45,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/alpine3.20/Dockerfile b/3.14-rc/alpine3.20/Dockerfile index 70e5d43be..922195247 100644 --- a/3.14-rc/alpine3.20/Dockerfile +++ b/3.14-rc/alpine3.20/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/alpine3.21/Dockerfile b/3.14-rc/alpine3.21/Dockerfile index 12ae69e73..8f659ec6f 100644 --- a/3.14-rc/alpine3.21/Dockerfile +++ b/3.14-rc/alpine3.21/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/bookworm/Dockerfile b/3.14-rc/bookworm/Dockerfile index effe40bb2..efcd1a3ce 100644 --- a/3.14-rc/bookworm/Dockerfile +++ b/3.14-rc/bookworm/Dockerfile @@ -38,7 +38,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/slim-bookworm/Dockerfile b/3.14-rc/slim-bookworm/Dockerfile index 22d716de4..5d82533b4 100644 --- a/3.14-rc/slim-bookworm/Dockerfile +++ b/3.14-rc/slim-bookworm/Dockerfile @@ -63,7 +63,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -119,8 +119,9 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.14-rc/slim-bullseye/Dockerfile b/3.14-rc/slim-trixie/Dockerfile similarity index 91% rename from 3.14-rc/slim-bullseye/Dockerfile rename to 3.14-rc/slim-trixie/Dockerfile index d8cff31e8..f8b9ee340 100644 --- a/3.14-rc/slim-bullseye/Dockerfile +++ b/3.14-rc/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV PYTHON_VERSION 3.14.0b2 ENV PYTHON_SHA256 7ac9e84844bbc0a5a8f1f79a37a68b3b8caf2a58b4aa5999c49227cb36e70ea6 @@ -63,7 +63,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -119,13 +119,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.14-rc/bullseye/Dockerfile b/3.14-rc/trixie/Dockerfile similarity index 96% rename from 3.14-rc/bullseye/Dockerfile rename to 3.14-rc/trixie/Dockerfile index f6246d76f..d8cc5dd05 100644 --- a/3.14-rc/bullseye/Dockerfile +++ b/3.14-rc/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV PYTHON_VERSION 3.14.0b2 ENV PYTHON_SHA256 7ac9e84844bbc0a5a8f1f79a37a68b3b8caf2a58b4aa5999c49227cb36e70ea6 @@ -38,7 +38,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.9/slim-bookworm/Dockerfile b/3.9/slim-bookworm/Dockerfile index 19b1b68ce..27211e70e 100644 --- a/3.9/slim-bookworm/Dockerfile +++ b/3.9/slim-bookworm/Dockerfile @@ -112,8 +112,9 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.9/slim-bullseye/Dockerfile b/3.9/slim-trixie/Dockerfile similarity index 92% rename from 3.9/slim-bullseye/Dockerfile rename to 3.9/slim-trixie/Dockerfile index ed73ba93a..bf6cdeb3c 100644 --- a/3.9/slim-bullseye/Dockerfile +++ b/3.9/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 ENV PYTHON_VERSION 3.9.22 @@ -112,13 +112,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.9/bullseye/Dockerfile b/3.9/trixie/Dockerfile similarity index 98% rename from 3.9/bullseye/Dockerfile rename to 3.9/trixie/Dockerfile index afc057b96..d80eba542 100644 --- a/3.9/bullseye/Dockerfile +++ b/3.9/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 ENV PYTHON_VERSION 3.9.22 diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 8b3b8c824..b0ee03d7f 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -7,6 +7,12 @@ ; def rcVersion: env.version | rtrimstr("-rc") + ; + def clean_apt: + # TODO once bookworm is EOL, remove this and just hard-code "apt-get dist-clean" instead + if env.variant | contains("bookworm") then + "rm -rf /var/lib/apt/lists/*" + else "apt-get dist-clean" end -}} {{ if is_alpine then ( -}} FROM alpine:{{ env.variant | ltrimstr("alpine") }} @@ -48,7 +54,7 @@ RUN set -eux; \ uuid-dev \ {{ ) end -}} ; \ - rm -rf /var/lib/apt/lists/* + {{ clean_apt }} {{ ) end -}} {{ @@ -180,10 +186,10 @@ RUN set -eux; \ --enable-shared \ {{ # <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance - # skip LTO on alpine on riscv64: https://github.com/docker-library/python/pull/935, https://github.com/docker-library/python/pull/1038 + # skip LTO on riscv64: https://github.com/docker-library/python/pull/935, https://github.com/docker-library/python/pull/1038 if rcVersion == "3.9" then "" else ( -}} - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ {{ ) end -}} --with-ensurepip \ ; \ @@ -283,13 +289,14 @@ RUN set -eux; \ find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + {{ clean_apt }}; \ {{ ) else "" end -}} {{ ) end -}} \ diff --git a/versions.json b/versions.json index a4f1a93d8..5a3d58932 100644 --- a/versions.json +++ b/versions.json @@ -9,10 +9,10 @@ "version": "65.5.1" }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.21", "alpine3.20" ], @@ -28,10 +28,10 @@ "version": "65.5.1" }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.21", "alpine3.20" ], @@ -47,10 +47,10 @@ } }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.21", "alpine3.20", "windows/windowsservercore-ltsc2025", @@ -69,10 +69,10 @@ } }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.21", "alpine3.20", "windows/windowsservercore-ltsc2025", @@ -91,10 +91,10 @@ } }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.21", "alpine3.20", "windows/windowsservercore-ltsc2025", @@ -113,10 +113,10 @@ "version": "58.1.0" }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.21", "alpine3.20" ], diff --git a/versions.sh b/versions.sh index f574d65d2..d0a45d3b4 100755 --- a/versions.sh +++ b/versions.sh @@ -195,8 +195,8 @@ for version in "${versions[@]}"; do version: env.fullVersion, variants: [ ( + "trixie", "bookworm", - "bullseye", empty | ., "slim-" + .), # https://github.com/docker-library/ruby/pull/142#issuecomment-320012893 (