STAC-24657: resolve base image via ARG BASE_IMAGE#14
Merged
Conversation
Andreagit97
approved these changes
Jun 9, 2026
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
Simplify base image resolution in the
apply-oci-labelscomposite to rely on a single well-known declaration in the Dockerfile:ARG BASE_IMAGE=<registry/name>:<tag>.The runtime
FROMin everydocker-imagesDockerfile is nowFROM ${BASE_IMAGE}(see StackVista/docker-images#109), so we no longer need to:ARG NAME=VALUEdeclaration from the Dockerfile.FROMline, strip--platform=/AS <stage>.envsubstthe ARG references to reconstruct the base reference.Instead, the action does a single
grep -E '^[[:space:]]*ARG[[:space:]]+BASE_IMAGE=', takes the first match, strips the prefix, and uses the value asorg.opencontainers.image.base.name.base-digestresolution viadocker buildx imagetools inspectis unchanged.The
base-nameinput remains an override for build systems (Family B-E) whose Dockerfile does not declareARG BASE_IMAGE(or has no Dockerfile at all).Changes
action.yml- replace FROM-parsing + ARG-export + envsubst block with a single-lineARG BASE_IMAGE=grep. Updated input descriptions.testdata/Dockerfile- useARG BASE_IMAGE=...+FROM ${BASE_IMAGE}to match the new convention.apply-oci-labels-ci.yml- comment update only; the matrix and assertions are unchanged. Existing smoke matrix already covers both the Dockerfile-extraction path and the overrides path.Compatibility
Callers that already pass explicit
base-name(Family B-E) are unaffected. Callers that rely on Dockerfile extraction must declareARG BASE_IMAGE=; thedocker-imagesPR above completes that rollout for the first consumer.