Repository navigation
pkg: Keep Go-version defaults only in Dockerfiles - #537
Merged
Merged
Conversation
vvoland
requested review from
glours and
ndeloof
and removed request for
a team
October 14, 2026 12:51
rumpl
approved these changes
Oct 14, 2026
thaJeztah
reviewed
Oct 14, 2026
Comment on lines
+31
to
+32
| ARG GO_VERSION="1.27.2" | ||
| # An unset GO_VERSION uses the rolling tag for GO_IMAGE_VARIANT. | ||
| ARG GO_VERSION |
Member
There was a problem hiding this comment.
Curious; should we do the reverse; keep the Dockerfile as canonical source of truth, and don't set GO_VERSION args if there's nothing to override?
Collaborator
Author
There was a problem hiding this comment.
That would work as well I guess...
@crazy-max any opinions here?
Member
There was a problem hiding this comment.
Hum would prefer to keep it explicit for provenance
Member
There was a problem hiding this comment.
Yeah, I think ideally, we'd just have the default version in Dockerfile, then for cases we need to override, we can set the build-arg.
thaJeztah
reviewed
Oct 16, 2026
| ARG GO_VERSION="1.27.2" | ||
| # An unset GO_VERSION uses the rolling tag for GO_IMAGE_VARIANT. | ||
| ARG GO_VERSION | ||
| ARG GO_IMAGE_VARIANT="bookworm" |
Member
There was a problem hiding this comment.
FWIW; we should also make a pass to migrate to "stable" (trixie); bookworm is oldstable.
Go-version defaults were duplicated in Bake and package Dockerfiles, which could drift and make direct builds differ from Bake builds. Removed the package-specific defaults from Bake and kept them in the Dockerfiles, alongside their upstream references. Bake still accepts explicit GO_VERSION overrides and defers to the Dockerfile default when the value is unset or empty. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
crazy-max
approved these changes
Oct 16, 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.
Go-version defaults were duplicated in Bake and package Dockerfiles,
which could drift and make direct builds differ from Bake builds.
Removed the package-specific defaults from Bake and kept them in the
Dockerfiles, alongside their upstream references.
Bake still accepts explicit GO_VERSION overrides and defers to the
Dockerfile default when the value is unset or empty.
Updated the Go-update workflow to write only Dockerfile defaults.
Direct and Bake builds use the same package-specific Go versions.