fix: replace distroless Python 3.11 base with python:3.12-slim and add CI smoke test#17
Draft
fix: replace distroless Python 3.11 base with python:3.12-slim and add CI smoke test#17
Conversation
The production image used gcr.io/distroless/python3-debian12:nonroot which ships Python 3.11.2, incompatible with the Python 3.12 backend. Compiled extensions (pydantic_core) fail to load at runtime. Changes: - Use python:3.12-slim as production base with non-root user - Add HEALTHCHECK to Dockerfile - Add smoke test step to docker.yaml CI that starts the container and validates /api/v1/health before pushing Co-authored-by: fajfer <11696312+fajfer@users.noreply.github.com>
Co-authored-by: fajfer <11696312+fajfer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix production image and add smoke test to CI
fix: replace distroless Python 3.11 base with python:3.12-slim and add CI smoke test
Feb 10, 2026
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.
Production image crashes on startup because
gcr.io/distroless/python3-debian12:nonrootships Python 3.11.2 while the backend builder compiles against Python 3.12. Native extensions (pydantic_core._pydantic_core) fail to load.Dockerfile
python:3.12-slim, matching the builder stage Python version.venvand activate viaPATHinstead of manually settingPYTHONPATHto a version-specificsite-packagespathchronowarden, uid 1000) andHEALTHCHECKinstructioncurl+ca-certificatesfor health checksCI smoke test (
docker.yaml)load: truebefore any push/api/v1/healthfor up to 30 secondsgithub.event_name != 'pull_request'Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.