Skip to content

Commit 2413f68

Browse files
authored
fix: use GOTOOLCHAIN=auto inside the Docker images (#4532)
1 parent f2d4110 commit 2413f68

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

build/buildx-alpine.Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ FROM golang:1.22-alpine
44
# related to https://github.com/golangci/golangci-lint/issues/3107
55
ENV GOROOT /usr/local/go
66

7+
# Allow to download a more recent version of Go.
8+
# https://go.dev/doc/toolchain
9+
# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto
10+
ENV GOTOOLCHAIN auto
11+
712
# gcc is required to support cgo;
813
# git and mercurial are needed most times for go get`, etc.
914
# See https://github.com/docker-library/golang/issues/80

build/buildx.Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ FROM golang:1.22
44
# related to https://github.com/golangci/golangci-lint/issues/3107
55
ENV GOROOT /usr/local/go
66

7+
# Allow to download a more recent version of Go.
8+
# https://go.dev/doc/toolchain
9+
# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto
10+
ENV GOTOOLCHAIN auto
11+
712
# Set all directories as safe
813
RUN git config --global --add safe.directory '*'
914

0 commit comments

Comments
 (0)