Skip to content

Commit

Permalink
fix: use GOTOOLCHAIN=auto inside the Docker images (#4532)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Mar 18, 2024
1 parent f2d4110 commit 2413f68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/buildx-alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions build/buildx.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 '*'

Expand Down

0 comments on commit 2413f68

Please sign in to comment.