Repository navigation
Conversation
A uv + Python 3.14 image with the locked, non-dev dependencies installed and the project on PATH. Dependencies sit in their own layer, so a source change does not reinstall them. The image carries .git, so get_git_version can stamp provenance; build it from a full clone, not a git worktree. .dockerignore keeps .env (and any *.env) out of the image: supply it at runtime. It also drops host venvs, caches and the exact-patch .python-version pin, which the base image's uv may not fetch.
jeffseif
reviewed
Nov 17, 2026
jeffseif
left a comment
Member
There was a problem hiding this comment.
good addition! Just a few suggestions and comments
A container built from a detached checkout (as CI checks out a pull request) raised TypeError from repo.active_branch. Same guard as fork #53.
- debian:trixie-slim and uv pinned by multi-arch digest - uv-managed Python under /opt/python, readable by a non-root user; .python-version no longer ignored, so the image runs dev's exact pin - ca-certificates for HTTPS from the slim base - fail the build if .git has no HEAD (e.g. built from a git worktree) - comments dropped; apt packages one per line
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.
Adds a
Dockerfileand.dockerignore, so the pipeline can run in a container on whatever infrastructure people use. The Dockerfile has no entrypoint: pass the command when you run it.What's in it
ghcr.io/astral-sh/uv:python3.14-bookworm-slim, which matchesrequires-python. It installs the locked, non-dev dependencies (uv sync --frozen --no-dev) in a layer of their own, so a change to the code doesn't reinstall them. The project's venv goes onPATH.gitandlibexpat1come from apt: the rasterio/GDAL wheels link libexpat, which the slim image leaves out..gitis copied in a final layer of its own, soutils.get_git_versioncan stamp provenance on outputs. That's why the image must be built from a full clone, not a git worktree.safe.directorylets git read the repository when the container runs as a non-root user..dockerignorekeeps.envand*.envout of the image: supply configuration at runtime, for example withdocker run --env-file .env. It also excludes host venvs, caches and the exact-patch.python-versionpin, which the base image's uv may not be able to fetch.Notes
COPY --exclude; the# syntax=line selects a recent enough frontend.get_git_versionraises at runtime. That is separate from this PR.Test plan
docker build -t luc .from a full clonedocker run --rm --env-file .env luc python -c "import jdluc"