Skip to content

Commit

Permalink
Set GOTOOLCHAIN to prevent go auto-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
yosifkit committed Sep 15, 2023
1 parent e2b0313 commit b643595
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 1.21/alpine3.17/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions 1.21/alpine3.18/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions 1.21/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions 1.21/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ RUN set -eux; \
{{ ) else "" end -}}
go version

{{ 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

{{ ) end -}}
ENV GOPATH /go
ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
Expand Down

0 comments on commit b643595

Please sign in to comment.