Skip to content
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

Set GOTOOLCHAIN to prevent go auto-upgrade #491

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

yosifkit
Copy link
Member

Fixes #472

Using an image that is too old for your project's minimum go version will cause go to fail and help inform the user that they are not using a new enough go for their project. So, rather than having go automatically upgrading the toolchain (GOTOOLCHAIN=auto, the default), we have opted to move the image to encourage users to upgrade the image to get newer versions of go.

(See also the comments on #472)

@yosifkit yosifkit merged commit 377e297 into docker-library:master Sep 22, 2023
26 checks passed
@yosifkit yosifkit deleted the gotoolchain branch September 22, 2023 20:49
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Sep 22, 2023
Changes:

- docker-library/golang@377e297: Merge pull request docker-library/golang#491 from infosiftr/gotoolchain
- docker-library/golang@b643595: Set `GOTOOLCHAIN` to prevent go auto-upgrade
{{ if [ "1.20" ] | index(env.version | rtrimstr("-rc")) then "" else ( -}}
# don't auto-upgrade the gotoolchain
# https://github.com/docker-library/golang/issues/472
ENV GOTOOLCHAIN=local
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to move this up a bit higher (later) to make sure our go invocations during install and verification don't somehow accidentally download. 👀

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.

proposal: set GOTOOLCHAIN=local (or =path) in our image
2 participants