-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly set GOTOOLCHAIN
environment variable
#1188
Comments
atc0005
added a commit
that referenced
this issue
Oct 26, 2023
Set variable to `local` to disable automatic fetching of Go toolchains newer than the version explicitly provided by each container image. refs GH-1188
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
In short, Go 1.21 and newer automatically download a newer Go toolchain when building code that has been explicitly marked as requiring a newer Go toolchain.
Overview from the official docs:
The intent behind the images provided by this project are two fold:
In both cases the very specific version of Go used is intentional. If I generate a project release after having tested against Go 1.21.1 I don't want to generate assets using Go 1.21.2 instead.
Likewise for CI use I want to fail the build fast if there is a hard version requirement that we're not meeting.
The official docs provide a way to set this expectation:
To set user-specific expectation:
go env -w GOTOOLCHAIN=local
References
GOTOOLCHAIN
to prevent go auto-upgrade docker-library/golang#491See also:
The text was updated successfully, but these errors were encountered: