chore: drop python3-dev from the Docker image (#29731)

The apt layer of the Docker image shrinks by about 60 MB. python3-dev installs Debian's own interpreter with its headers, and nothing in the image uses it.

The image's Python is the /usr/local build from the base image, which ships its own headers, and it is also the interpreter that installs tool and function requirements at runtime, so Debian's headers were never on the include path of anything built in the container. The zlib headers python3-dev pulled in stay through libmariadb-dev, which also brings the OpenSSL headers, so the optional mariadb connector still builds; the only other header package that goes with it is libexpat1-dev, which nothing in the pinned tree builds against.

Part of #29721.
This commit is contained in:
Classic298 2026-09-06 22:19:10 +02:00 committed by GitHub
parent ffe6ab9869
commit 039c4d665e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,7 +128,6 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
git build-essential pandoc gcc curl jq ca-certificates \
libmariadb-dev \
python3-dev \
ffmpeg libsm6 libxext6 zstd \
&& rm -rf /var/lib/apt/lists/*