Skip to content

Pin alpine:3 base image by digest to avoid Firewall quarantine - #212

Open
jmromeroes wants to merge 1 commit into
mainfrom
pin-alpine-3-digest
Open

jmromeroes wants to merge 1 commit into
mainfrom
pin-alpine-3-digest

Conversation

@jmromeroes

Copy link
Copy Markdown
Contributor

Summary

  • Pins the alpine:3 base image to the currently-cached digest sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b in Dockerfile.alpine (both FROM stages).
  • Resolved via 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.6 in Dockerfile and Dockerfile.slim) and #210 (pinned ubi-minimal:9.7 in Dockerfile.rh and goss:v0.4.10 in Dockerfile.test). alpine:3 was 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's apk upgrade step (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

  • Release IQ Server Docker Alpine build pulls the base image successfully (no 403 quarantine).
  • Alpine image builds and passes its goss validation via Dockerfile.test + goss.alpine.yaml (matrix cell IMAGE = 'alpine').
  • Verified locally:
    • hadolint on Dockerfile.alpine: 0 issues.
    • docker buildx build --check --file Dockerfile.alpine .: clean.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant