Skip to content

Commit

Permalink
Dockerfile: use GOTOOLCHAIN=local as default
Browse files Browse the repository at this point in the history
Related discussion in docker-library/golang#472

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 22, 2023
1 parent 3614749 commit f926d96
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ RUN test -n "$APT_MIRROR" && sed -ri "s#(httpredir|deb|security).debian.org#${AP
ARG DEBIAN_FRONTEND
RUN apt-get update && apt-get install --no-install-recommends -y file
ENV GO111MODULE=off
ARG GOTOOLCHAIN=local
ENV GOTOOLCHAIN=${GOTOOLCHAIN}

FROM base AS criu
ARG DEBIAN_FRONTEND
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.simple
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"

FROM ${GOLANG_IMAGE}
ENV GO111MODULE=off
ARG GOTOOLCHAIN=local
ENV GOTOOLCHAIN=${GOTOOLCHAIN}

# allow replacing debian mirror
ARG APT_MIRROR
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ ARG GO_VERSION=1.20.8
ARG GOTESTSUM_VERSION=v1.8.2
ARG GOWINRES_VERSION=v0.3.0
ARG CONTAINERD_VERSION=v1.7.6
ARG GOTOOLCHAIN=local

# Environment variable notes:
# - GO_VERSION must be consistent with 'Dockerfile' used by Linux.
Expand All @@ -175,6 +176,7 @@ ENV GO_VERSION=${GO_VERSION} `
GIT_VERSION=2.11.1 `
GOPATH=C:\gopath `
GO111MODULE=off `
GOTOOLCHAIN=${GOTOOLCHAIN} `
FROM_DOCKERFILE=1 `
GOTESTSUM_VERSION=${GOTESTSUM_VERSION} `
GOWINRES_VERSION=${GOWINRES_VERSION}
Expand Down
2 changes: 2 additions & 0 deletions hack/dockerfiles/generate-files.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN apt-get update && apt-get --no-install-recommends install -y git unzip
ARG PROTOC_VERSION
ARG TARGETOS
ARG TARGETARCH
ARG GOTOOLCHAIN=local
ENV GOTOOLCHAIN=${GOTOOLCHAIN}
RUN <<EOT
set -e
arch=$(echo $TARGETARCH | sed -e s/amd64/x86_64/ -e s/arm64/aarch_64/)
Expand Down

0 comments on commit f926d96

Please sign in to comment.