Pin alpine:3 base image by digest to avoid Firewall quarantine - #212
Open
jmromeroes wants to merge 1 commit into
Open
jmromeroes wants to merge 1 commit into
jmromeroes wants to merge 1 commit into
Conversation
Follow-up to #209 and #210. The `alpine:3` tag in `sonatype.repo.sonatype.app` is the last mutable base tag in the repo -- all other Dockerfiles (Dockerfile, Dockerfile.slim, Dockerfile.rh) and Dockerfile.test's goss image are already pinned by digest. Firewall quarantines on first download of a given reference, so any subsequent quarantine on the `alpine:3` tag would block Dockerfile.alpine builds until a manual digest resolution. Pinning to the currently-cached digest lets pulls succeed regardless of tag-level quarantines. Digest: sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b (resolved via `docker buildx imagetools inspect sonatype.repo.sonatype.app/docker-all/alpine:3` against the Sonatype proxy, so it is already cached). The `apk upgrade` step inside the Dockerfile (added in CLM-42171) still runs at build time, so the slightly older base layer is patched before the image ships. Both FROM statements in Dockerfile.alpine use `alpine:3`; both are pinned to the same digest.
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
alpine:3base image to the currently-cached digestsha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8binDockerfile.alpine(bothFROMstages).docker buildx imagetools inspect sonatype.repo.sonatype.app/docker-all/alpine:3, so the digest is already cached in the proxy — pulls by digest are not subject to any future tag-level Firewall quarantine.Context
Direct follow-up to #209 (pinned
ubi-minimal:9.6inDockerfileandDockerfile.slim) and #210 (pinnedubi-minimal:9.7inDockerfile.rhandgoss:v0.4.10inDockerfile.test).alpine:3was called out in #210's description as "not affected" at the time — meaning Firewall hadn't quarantined it yet. It's the last mutable base tag in the tree; pre-emptively pinning it closes the class of "release build breaks because Firewall quarantined our base tag overnight" issues that showed up on the 1.207.0 release train.Dockerfile.alpine'sapk upgradestep (added in CLM-42171) still runs at build time, so package updates land on top of the pinned layer — this pin only freezes the base image layers, not the runtime package set.Test plan
Dockerfile.test+goss.alpine.yaml(matrix cellIMAGE = 'alpine').hadolintonDockerfile.alpine: 0 issues.docker buildx build --check --file Dockerfile.alpine .: clean.