From 2413f68f82862ea4ef5fc8daf508dcc32260d6ba Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez <ldez@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:21:06 +0100 Subject: [PATCH] fix: use GOTOOLCHAIN=auto inside the Docker images (#4532) --- build/buildx-alpine.Dockerfile | 5 +++++ build/buildx.Dockerfile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build/buildx-alpine.Dockerfile b/build/buildx-alpine.Dockerfile index e0e426cb..c435e6af 100644 --- a/build/buildx-alpine.Dockerfile +++ b/build/buildx-alpine.Dockerfile @@ -4,6 +4,11 @@ FROM golang:1.22-alpine # related to https://github.com/golangci/golangci-lint/issues/3107 ENV GOROOT /usr/local/go +# Allow to download a more recent version of Go. +# https://go.dev/doc/toolchain +# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto +ENV GOTOOLCHAIN auto + # gcc is required to support cgo; # git and mercurial are needed most times for go get`, etc. # See https://github.com/docker-library/golang/issues/80 diff --git a/build/buildx.Dockerfile b/build/buildx.Dockerfile index 0e585067..8d2f015c 100644 --- a/build/buildx.Dockerfile +++ b/build/buildx.Dockerfile @@ -4,6 +4,11 @@ FROM golang:1.22 # related to https://github.com/golangci/golangci-lint/issues/3107 ENV GOROOT /usr/local/go +# Allow to download a more recent version of Go. +# https://go.dev/doc/toolchain +# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto +ENV GOTOOLCHAIN auto + # Set all directories as safe RUN git config --global --add safe.directory '*'