build: try ghcr.io/oioki/python-base-image for distroless targets#7959
Draft
oioki wants to merge 1 commit into
Draft
build: try ghcr.io/oioki/python-base-image for distroless targets#7959oioki wants to merge 1 commit into
oioki wants to merge 1 commit into
Conversation
Swap the application-distroless and application-distroless-debug FROMs from ghcr.io/getsentry/dhi/python:3.13-debian13(-dev) to ghcr.io/oioki/python-base-image/python:3.13-debian13(-dev). The replacement is a drop-in: same /opt/python layout, same LD_LIBRARY_PATH, same CA bundle path. Multi-arch images (amd64+arm64) are published from https://github.com/oioki/python-base-image and built by walking CPython's shared-library closure rather than apko/ melange-style exclusion lists. For showcase only — draft. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
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.
Summary
Swap the
application-distrolessandapplication-distroless-debugbase images fromghcr.io/getsentry/dhi/python:3.13-debian13(-dev)toghcr.io/oioki/python-base-image/python:3.13-debian13(-dev).This is draft / showcase only — demonstrating that a community-built distroless Python image can be a drop-in for DHI here. Not intended to merge.
What's the replacement image
oioki/python-base-image— a distroless Python 3.13 base built from scratch on Debian 13. Multi-arch (amd64+arm64), published to GHCR.Same layout as DHI:
/opt/python/bin/python3LD_LIBRARY_PATH=/opt/python/lib/etc/ssl/certs/ca-certificates.crtpython3nonroot(snuba'sdistroless_prepoverwrites/etc/passwdanyway)Difference vs DHI: build is a plain Dockerfile that walks CPython's shared-library closure (
ldd-driven, transitive) rather than apko/melange-style exclusion lists. Resulting image is 73.7 MB (vs DHI's 83.6 MB measured locally).Test plan
docker buildx build --target application-distroless .— green locallyapplication-distrolessandapplication-distroless-debugKnown caveat (pre-existing, NOT caused by this change)
Running
snuba --helpagainst the resulting distroless image fails withModuleNotFoundError: No module named 'encodings'— the venv'spyvenv.cfgstill references/usr/local/binfrom the build image. The DHI-based image (current master) fails identically, so this PR doesn't regress anything. A fix is a one-linesedindistroless_prepbut is intentionally out of scope here.🤖 Generated with Claude Code