Remove python3-debian12 and cleanup readmes#2084
Conversation
|
🌳 🔧 Config Check This pull request has modified the root BUILD --- /dev/fd/63 2026-05-12 14:53:59.354488139 +0000
+++ /dev/fd/62 2026-05-12 14:53:59.354488139 +0000
@@ -518,18 +518,6 @@
{REGISTRY}/{PROJECT_ID}/nodejs24:nonroot-arm64 //nodejs:nodejs24_nonroot_arm64_debian13
{REGISTRY}/{PROJECT_ID}/nodejs24:nonroot-ppc64le //nodejs:nodejs24_nonroot_ppc64le_debian13
{REGISTRY}/{PROJECT_ID}/nodejs24:nonroot-s390x //nodejs:nodejs24_nonroot_s390x_debian13
-{REGISTRY}/{PROJECT_ID}/python3-debian12:debug //python3:python3_debug_root_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:debug-amd64 //python3:python3_debug_root_amd64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:debug-arm64 //python3:python3_debug_root_arm64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:debug-nonroot //python3:python3_debug_nonroot_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:debug-nonroot-amd64 //python3:python3_debug_nonroot_amd64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:debug-nonroot-arm64 //python3:python3_debug_nonroot_arm64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:latest //python3:python3_root_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:latest-amd64 //python3:python3_root_amd64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:latest-arm64 //python3:python3_root_arm64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:nonroot //python3:python3_nonroot_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:nonroot-amd64 //python3:python3_nonroot_amd64_debian12
-{REGISTRY}/{PROJECT_ID}/python3-debian12:nonroot-arm64 //python3:python3_nonroot_arm64_debian12
{REGISTRY}/{PROJECT_ID}/python3-debian13:debug //python3:python3_debug_root_debian13
{REGISTRY}/{PROJECT_ID}/python3-debian13:debug-amd64 //python3:python3_debug_root_amd64_debian13
{REGISTRY}/{PROJECT_ID}/python3-debian13:debug-arm64 //python3:python3_debug_root_arm64_debian13 |
There was a problem hiding this comment.
Code Review
This pull request migrates the distroless Python images from Debian 12 (Python 3.11) to Debian 13 (Python 3.13), updating Bazel configurations, documentation, and examples accordingly. Feedback focuses on ensuring ABI compatibility in the provided Dockerfile examples by using a Python 3.13-based build image instead of the default Debian 13 slim image, which currently defaults to Python 3.11. There is also a suggestion to simplify the README now that only a single Python version is supported.
98a9b0b to
eb42fcc
Compare
|
🌳 🔄 Image Check |
Signed-off-by: Appu <appu@google.com>
eb42fcc to
22b97d1
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the default distroless images and Python runtime from Debian 12 (bookworm) to Debian 13 (trixie). Key changes include updating primary image references in the documentation and examples, removing Debian 12 configurations from the Python 3 build logic, and updating the Python 3 requirements example to use a compatible trixie-based build image. The Python 3 documentation has also been expanded with a compatibility section addressing ABI and pathing requirements for multi-stage builds. I have no feedback to provide as there were no review comments.
There was a problem hiding this comment.
Code Review
This pull request transitions the distroless Python images from Debian 12 to Debian 13, updating the default Python version to 3.13 and removing support for the previous version. Documentation, build configurations, and examples have been updated to reflect this change. The reviewer suggested an optimization for the Python requirements example to reduce image size by cleaning up the package manager cache.
| RUN apt-get update && \ | ||
| apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev && \ | ||
| python3 -m venv /venv && \ | ||
| apt-get install --no-install-suggests --no-install-recommends --yes gcc libc6-dev && \ | ||
| # Symlink the distroless path for python: /usr/bin/python to the build | ||
| # image path: /usr/local/bin/python to ensure the runtime image's venv has | ||
| # the right python paths. | ||
| ln -s /usr/local/bin/python /usr/bin/python && \ | ||
| /usr/bin/python -m venv /venv && \ | ||
| /venv/bin/pip install --upgrade pip setuptools wheel |
There was a problem hiding this comment.
To reduce the size of this build layer, it's a good practice to clean up the apt cache after installing packages. You can do this by adding && rm -rf /var/lib/apt/lists/* to the end of your RUN command.
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes gcc libc6-dev && \
# Symlink the distroless path for python: /usr/bin/python to the build
# image path: /usr/local/bin/python to ensure the runtime image's venv has
# the right python paths.
ln -s /usr/local/bin/python /usr/bin/python && \
/usr/bin/python -m venv /venv && \
/venv/bin/pip install --upgrade pip setuptools wheel && \
rm -rf /var/lib/apt/lists/*
As per our
SUPPORT_POLICY.md. Python3 for debian12 is deprecated.