Repository navigation
build: pin base images by digest and upgrade base packages at build time - #295
Merged
Merged
Conversation
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.
What and why
Pins the three base images in the Dockerfile by digest and runs
apk upgradebefore installing packages.The
dockerCI job failed on #292 and #293 while Wolfi's apk server returned errors for a few minutes; a rerun passed unchanged. The build was exposed becausewolfi-base:latestandnode:26-bookworm-slimchange digest often (wolfi moved twice in about 21 hours). Each move invalidates the apk layer, so every build downloaded packages again, and PR builds got almost no use from the cache main writes.Changes:
uv,nodeandwolfi-baseare pinned to their multi-arch index digests, so the layer cache stays valid until a digest is bumped deliberately.FROMare now written out in full. Dependabot does not expand ARGs inFROMlines and skipped bothwolfi-baseanduvwithout an error; its last docker run found onlynode. With literal references it can update all three digests.apk upgraderuns in the same layer asapk add. Release builds run without a cache, so released images still get current glibc, openssl and other base package fixes even if the pinned digest is a few days old.Breaking: the
BASE_IMAGE_REGISTRYandUV_VERSIONbuild args are removed. Nothing in this repo sets them, but a build passing--build-arg BASE_IMAGE_REGISTRY=<mirror>now pulls fromcgr.devwithout warning.After merge, the next Dependabot docker run should list
wolfi-baseanduvin its dependency snapshot.How it was tested
docker build --build-arg VERSION=0.0.0.dev0 .on arm64 succeeds, and the log shows all three stages resolving the pinned digests. CI covers amd64./api/healthreturnsstatus: okwith version0.0.0.dev0,/serves the UI root, and the container runs as uid 1000. Python is 3.14.10 and uv is 0.12.11.apk version -l '<'in the final image reports no pending upgrades.uv run pytest: 2164 passed, 19 skipped.Checklist
uv run pytest)AI assistance