-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Update python #20057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update python #20057
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes: - docker-library/python@2074a85e: Merge pull request docker-library/python#1086 from infosiftr/zstd - docker-library/python@54f31933: Merge pull request docker-library/python#1087 from infosiftr/s390x - docker-library/python@8545fffc: Add back s390x for 3.14+ - docker-library/python@a83345bc: Add "zstd" library during build to support "zstd" module in stdlib
Diff for 0b52181:diff --git a/_bashbrew-cat b/_bashbrew-cat
index f7c00cb..5f96564 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -4,12 +4,12 @@ Builder: buildkit
Tags: 3.9.23-alpine3.21, 3.9-alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 059df87446003f462a05aed0cff9b884da0b6874
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.9/alpine3.21
Tags: 3.9.23-alpine3.22, 3.9-alpine3.22, 3.9.23-alpine, 3.9-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 059df87446003f462a05aed0cff9b884da0b6874
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.9/alpine3.22
Tags: 3.9.23-bookworm, 3.9-bookworm
@@ -35,12 +35,12 @@ Directory: 3.9/trixie
Tags: 3.10.18-alpine3.21, 3.10-alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 093598a0190ba9074b899d6a0a21a00c859aac56
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.10/alpine3.21
Tags: 3.10.18-alpine3.22, 3.10-alpine3.22, 3.10.18-alpine, 3.10-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 093598a0190ba9074b899d6a0a21a00c859aac56
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.10/alpine3.22
Tags: 3.10.18-bookworm, 3.10-bookworm
@@ -66,12 +66,12 @@ Directory: 3.10/trixie
Tags: 3.11.13-alpine3.21, 3.11-alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 093598a0190ba9074b899d6a0a21a00c859aac56
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.11/alpine3.21
Tags: 3.11.13-alpine3.22, 3.11-alpine3.22, 3.11.13-alpine, 3.11-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 093598a0190ba9074b899d6a0a21a00c859aac56
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.11/alpine3.22
Tags: 3.11.13-bookworm, 3.11-bookworm
@@ -97,12 +97,12 @@ Directory: 3.11/trixie
Tags: 3.12.11-alpine3.21, 3.12-alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 093598a0190ba9074b899d6a0a21a00c859aac56
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.12/alpine3.21
Tags: 3.12.11-alpine3.22, 3.12-alpine3.22, 3.12.11-alpine, 3.12-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 093598a0190ba9074b899d6a0a21a00c859aac56
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.12/alpine3.22
Tags: 3.12.11-bookworm, 3.12-bookworm
@@ -128,12 +128,12 @@ Directory: 3.12/trixie
Tags: 3.13.8-alpine3.21, 3.13-alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 668691664771c99b228c9acc107e9fec60b9bd96
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.13/alpine3.21
Tags: 3.13.8-alpine3.22, 3.13-alpine3.22, 3.13.8-alpine, 3.13-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: 668691664771c99b228c9acc107e9fec60b9bd96
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.13/alpine3.22
Tags: 3.13.8-bookworm, 3.13-bookworm
@@ -174,34 +174,34 @@ Builder: classic
Constraints: windowsservercore-ltsc2025
Tags: 3.14.0-alpine3.21, 3.14-alpine3.21, 3-alpine3.21, alpine3.21
-Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64
-GitCommit: e7f6a1c7956a24dc1746d4580ed5961547016a01
+Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.14/alpine3.21
Tags: 3.14.0-alpine3.22, 3.14-alpine3.22, 3-alpine3.22, alpine3.22, 3.14.0-alpine, 3.14-alpine, 3-alpine, alpine
-Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64
-GitCommit: e7f6a1c7956a24dc1746d4580ed5961547016a01
+Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.14/alpine3.22
Tags: 3.14.0-bookworm, 3.14-bookworm, 3-bookworm, bookworm
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: e7f6a1c7956a24dc1746d4580ed5961547016a01
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.14/bookworm
Tags: 3.14.0-slim-bookworm, 3.14-slim-bookworm, 3-slim-bookworm, slim-bookworm
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: e7f6a1c7956a24dc1746d4580ed5961547016a01
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.14/slim-bookworm
Tags: 3.14.0-slim-trixie, 3.14-slim-trixie, 3-slim-trixie, slim-trixie, 3.14.0-slim, 3.14-slim, 3-slim, slim
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: e7f6a1c7956a24dc1746d4580ed5961547016a01
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.14/slim-trixie
Tags: 3.14.0-trixie, 3.14-trixie, 3-trixie, trixie
SharedTags: 3.14.0, 3.14, 3, latest
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: e7f6a1c7956a24dc1746d4580ed5961547016a01
+GitCommit: a83345bce8e75b407f283511dc3128b2062d8c1e
Directory: 3.14/trixie
Tags: 3.14.0-windowsservercore-ltsc2022, 3.14-windowsservercore-ltsc2022, 3-windowsservercore-ltsc2022, windowsservercore-ltsc2022
diff --git a/python_3.10-alpine/Dockerfile b/python_3.10-alpine/Dockerfile
index 5825dfc..820b513 100644
--- a/python_3.10-alpine/Dockerfile
+++ b/python_3.10-alpine/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 ae665bc678abd9ab6a6e1573d2481625a53719bc517e9a634ed2b9fefae381
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.10-alpine3.21/Dockerfile b/python_3.10-alpine3.21/Dockerfile
index a3ec54a..e91793c 100644
--- a/python_3.10-alpine3.21/Dockerfile
+++ b/python_3.10-alpine3.21/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 ae665bc678abd9ab6a6e1573d2481625a53719bc517e9a634ed2b9fefae381
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.11-alpine/Dockerfile b/python_3.11-alpine/Dockerfile
index c1680e4..73b6d1e 100644
--- a/python_3.11-alpine/Dockerfile
+++ b/python_3.11-alpine/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 8fb5f9fbc7609fa822cb31549884575db7fd9657cbffb89510b5d7975963a8
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.11-alpine3.21/Dockerfile b/python_3.11-alpine3.21/Dockerfile
index 078086c..a1f4656 100644
--- a/python_3.11-alpine3.21/Dockerfile
+++ b/python_3.11-alpine3.21/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 8fb5f9fbc7609fa822cb31549884575db7fd9657cbffb89510b5d7975963a8
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.12-alpine/Dockerfile b/python_3.12-alpine/Dockerfile
index bef8c19..afac11c 100644
--- a/python_3.12-alpine/Dockerfile
+++ b/python_3.12-alpine/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 c30bb24b7f1e9a19b11b55a546434f74e739bb4c271a3e3a80ff4380d49f7a
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.12-alpine3.21/Dockerfile b/python_3.12-alpine3.21/Dockerfile
index b4a1f55..4f98f35 100644
--- a/python_3.12-alpine3.21/Dockerfile
+++ b/python_3.12-alpine3.21/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 c30bb24b7f1e9a19b11b55a546434f74e739bb4c271a3e3a80ff4380d49f7a
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.13-alpine/Dockerfile b/python_3.13-alpine/Dockerfile
index f32cbed..19acd8c 100644
--- a/python_3.13-alpine/Dockerfile
+++ b/python_3.13-alpine/Dockerfile
@@ -23,16 +23,13 @@ ENV PYTHON_SHA256 b9910730526b298299b46b35595ced9055722df60c06ad6301f6a4e2c728a2
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -44,10 +41,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.13-alpine3.21/Dockerfile b/python_3.13-alpine3.21/Dockerfile
index 33846a3..676dd7a 100644
--- a/python_3.13-alpine3.21/Dockerfile
+++ b/python_3.13-alpine3.21/Dockerfile
@@ -23,16 +23,13 @@ ENV PYTHON_SHA256 b9910730526b298299b46b35595ced9055722df60c06ad6301f6a4e2c728a2
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -44,10 +41,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.9-alpine/Dockerfile b/python_3.9-alpine/Dockerfile
index 242d08b..ff29c90 100644
--- a/python_3.9-alpine/Dockerfile
+++ b/python_3.9-alpine/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 61a42919e13d539f7673cf11d1c404380e28e540510860b9d242196e165709
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_3.9-alpine3.21/Dockerfile b/python_3.9-alpine3.21/Dockerfile
index ec25bdb..38b800a 100644
--- a/python_3.9-alpine3.21/Dockerfile
+++ b/python_3.9-alpine3.21/Dockerfile
@@ -28,16 +28,13 @@ ENV PYTHON_SHA256 61a42919e13d539f7673cf11d1c404380e28e540510860b9d242196e165709
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -49,10 +46,12 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
; \
diff --git a/python_alpine/Dockerfile b/python_alpine/Dockerfile
index 7b75716..86ea2cc 100644
--- a/python_alpine/Dockerfile
+++ b/python_alpine/Dockerfile
@@ -22,16 +22,13 @@ ENV PYTHON_SHA256 2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -43,12 +40,15 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
+ zstd-dev \
; \
\
wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \
diff --git a/python_alpine3.21/Dockerfile b/python_alpine3.21/Dockerfile
index 7c33392..c378811 100644
--- a/python_alpine3.21/Dockerfile
+++ b/python_alpine3.21/Dockerfile
@@ -22,16 +22,13 @@ ENV PYTHON_SHA256 2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
- gnupg \
- tar \
- xz \
- \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
findutils \
gcc \
gdbm-dev \
+ gnupg \
libc-dev \
libffi-dev \
libnsl-dev \
@@ -43,12 +40,15 @@ RUN set -eux; \
pax-utils \
readline-dev \
sqlite-dev \
+ tar \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
+ xz \
xz-dev \
zlib-dev \
+ zstd-dev \
; \
\
wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \
diff --git a/python_bookworm/Dockerfile b/python_bookworm/Dockerfile
index fc40a1d..f802ef7 100644
--- a/python_bookworm/Dockerfile
+++ b/python_bookworm/Dockerfile
@@ -23,6 +23,12 @@ ENV PYTHON_VERSION 3.14.0
ENV PYTHON_SHA256 2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3e9
RUN set -eux; \
+ \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
+ libzstd-dev \
+ ; \
\
wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \
echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; \
@@ -94,6 +100,20 @@ RUN set -eux; \
\
ldconfig; \
\
+ apt-mark auto '.*' > /dev/null; \
+ apt-mark manual $savedAptMark; \
+ 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 -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/*; \
+ \
export PYTHONDONTWRITEBYTECODE=1; \
python3 --version; \
pip3 --version
diff --git a/python_slim-bookworm/Dockerfile b/python_slim-bookworm/Dockerfile
index 5208bfd..efc7d3a 100644
--- a/python_slim-bookworm/Dockerfile
+++ b/python_slim-bookworm/Dockerfile
@@ -41,6 +41,7 @@ RUN set -eux; \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
+ libzstd-dev \
make \
tk-dev \
uuid-dev \
diff --git a/python_slim/Dockerfile b/python_slim/Dockerfile
index 6b35ef6..1abf773 100644
--- a/python_slim/Dockerfile
+++ b/python_slim/Dockerfile
@@ -41,6 +41,7 @@ RUN set -eux; \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
+ libzstd-dev \
make \
tk-dev \
uuid-dev \
diff --git a/python_trixie/Dockerfile b/python_trixie/Dockerfile
index 6193c5a..7aa50e8 100644
--- a/python_trixie/Dockerfile
+++ b/python_trixie/Dockerfile
@@ -23,6 +23,12 @@ ENV PYTHON_VERSION 3.14.0
ENV PYTHON_SHA256 2299dae542d395ce3883aca00d3c910307cd68e0b2f7336098c8e7b7eee9f3e9
RUN set -eux; \
+ \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
+ libzstd-dev \
+ ; \
\
wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \
echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; \
@@ -94,6 +100,20 @@ RUN set -eux; \
\
ldconfig; \
\
+ apt-mark auto '.*' > /dev/null; \
+ apt-mark manual $savedAptMark; \
+ 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 -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; \
+ apt-get dist-clean; \
+ \
export PYTHONDONTWRITEBYTECODE=1; \
python3 --version; \
pip3 --version Relevant Maintainers: |
tianon
approved these changes
Oct 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes: