chore: Dockerfile (multi-stage, Python 3.14, non-root, healthcheck)#34
Merged
Conversation
Port Teller's multi-stage Dockerfile, bump base to python:3.14-slim. Builder materialises the venv via uv sync --frozen --no-dev; runtime copies only the venv + src/ onto a fresh slim base, runs as non-root user `app`. HEALTHCHECK hits /api/v1/health (template's API prefix). Drop the data/ COPY — template has no data dir. UV_PYTHON_DOWNLOADS=never + UV_PYTHON_PREFERENCE=only-system pin to the system Python so pyvenv.cfg symlinks survive the stage handover. Closes #6 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
python:3.12-slim→python:3.14-slim.teller→app; drop theCOPY data/line (template has nodata/); update healthcheck path from/api/health→/api/v1/healthto match the template's API prefix.uv sync --frozen --no-dev; runtime carries only.venv+src/. No uv, no pip cache, no build tools, no dev deps in the runtime image.urllib.request(no curl in image).Closes #6.
Test plan
USER app)./api/v1/health(200 after feat: backend scaffold (FastAPI app, /api/v1/health, /api/v1/echo, sessions) #17 lands).docker build .smoke — deferred to ticket test: end-to-end smoke (docker compose up, sample PR runs every gate green, eval workflow_dispatch) #27 (full e2e), sincesrc/api/main.pyis created by feat: backend scaffold (FastAPI app, /api/v1/health, /api/v1/echo, sessions) #17.🤖 Generated with Claude Code