Repository navigation
Conversation
Pass a VERSION build-arg (defaulting to 'dev') through to the final
image stage and emit it as an OCI-standard version label. Update
managers and container dashboards read this label to display the running
release and to show a meaningful 'v_old -> v_new' diff when an update is
available. Without it cloudflared surfaces only as an opaque image hash.
The ARG is declared in the final stage (after the distroless FROM) so
the builder stage remains unaffected. Existing CI that does not supply
VERSION will get the 'dev' default; release pipelines should pass
--build-arg VERSION=${{ github.ref_name }} (or equivalent).
Closes cloudflare#1682
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
Closes #1682.
Adds the standard OCI
org.opencontainers.image.versionannotation to all three release Dockerfiles (Dockerfile,Dockerfile.amd64,Dockerfile.arm64).Update managers and container dashboards (e.g. Watchtower, Renovate, Docksentry) read this label to display the running release and to show a meaningful
v_old → v_newdiff when an update is available. Without it, cloudflared surfaces only as an opaque image hash + build date.Change
A
VERSIONbuild-arg (defaulting todev) is declared in the final stage of each Dockerfile and emitted as the OCI version label:Existing CI that does not supply
VERSIONgets thedevdefault; release pipelines should pass the release tag:docker buildx build --build-arg VERSION=${{ github.ref_name }} ...The builder stage is unchanged. No other files are modified.