Skip to content

Commit

Permalink
Explicitly set GOTOOLCHAIN environment variable
Browse files Browse the repository at this point in the history
Set variable to `local` to disable automatic fetching of
Go toolchains newer than the version explicitly provided
by each container image.

refs GH-1188
  • Loading branch information
atc0005 committed Oct 26, 2023
1 parent 308f80f commit 3b03e50
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mirror/1.19/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ LABEL org.opencontainers.image.description="Docker image intended to mirror \
latest upstream golang image for the Go 1.19 series. Used by \
Makefile-driven test, linting and build tasks."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"
6 changes: 6 additions & 0 deletions mirror/1.20/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ LABEL org.opencontainers.image.description="Docker image intended to mirror \
latest upstream golang image for the Go 1.20 series. Used by \
Makefile-driven test, linting and build tasks."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"
6 changes: 6 additions & 0 deletions mirror/1.21/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ LABEL org.opencontainers.image.description="Docker image intended to mirror \
latest upstream golang image for the Go 1.21 series. Used by \
Makefile-driven test, linting and build tasks."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"
6 changes: 6 additions & 0 deletions oldstable/build/alpine-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# NOTE: This version was different than the base `gcc` pkg when last checked
ENV APK_GCC_MINGW64_VERSION="12.2.0-r3"

Expand Down
6 changes: 6 additions & 0 deletions oldstable/build/alpine-x86/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
image. Supports cross-platform, static cgo-enabled builds for Windows and Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# NOTE: This version was different than the base `gcc` pkg when last checked
ENV APK_GCC_MINGW64_VERSION="12.2.0-r3"

Expand Down
6 changes: 6 additions & 0 deletions oldstable/build/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
releases of Go code. Based on the latest version of the upstream oldstable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

ENV APT_BSDMAINUTILS_VERSION="12.1.8"
ENV APT_TREE_VERSION="2.1.0-1"
ENV XZ_UTILS_VERSION="5.4.1-0.2"
Expand Down
6 changes: 6 additions & 0 deletions oldstable/combined/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ LABEL org.opencontainers.image.description="Docker container image used to lint,
Based on the latest version of the current outgoing stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

ENV GOLANGCI_LINT_VERSION="v1.55.1"
ENV STATICCHECK_VERSION="v0.4.6"
ENV GOVULNCHECK_VERSION="v1.0.1"
Expand Down
6 changes: 6 additions & 0 deletions stable/build/alpine-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# NOTE: This version was different than the base `gcc` pkg when last checked
ENV APK_GCC_MINGW64_VERSION="12.2.0-r3"

Expand Down
6 changes: 6 additions & 0 deletions stable/build/alpine-x86/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
image. Supports cross-platform, static cgo-enabled builds for Windows and Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# NOTE: This version was different than the base `gcc` pkg when last checked
ENV APK_GCC_MINGW64_VERSION="12.2.0-r3"

Expand Down
6 changes: 6 additions & 0 deletions stable/build/cgo-mingw-w64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
Supports static, cgo-enabled builds via mingw."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

ENV APT_BSDMAINUTILS_VERSION="12.1.8"
ENV APT_TREE_VERSION="2.1.0-1"
ENV APT_GCC_MULTILIB_VERSION="4:12.2.0-3"
Expand Down
6 changes: 6 additions & 0 deletions stable/build/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
releases of Go code. Based on the latest version of the upstream stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

ENV APT_BSDMAINUTILS_VERSION="12.1.8"
ENV APT_TREE_VERSION="2.1.0-1"
ENV XZ_UTILS_VERSION="5.4.1-0.2"
Expand Down
6 changes: 6 additions & 0 deletions stable/combined/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ LABEL org.opencontainers.image.description="Docker container image used to lint,
Based on the latest version of the current stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

ENV GOLANGCI_LINT_VERSION="v1.55.1"
ENV STATICCHECK_VERSION="v0.4.6"
ENV GOVULNCHECK_VERSION="v1.0.1"
Expand Down
6 changes: 6 additions & 0 deletions unstable/build/alpine-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
Windows and Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# NOTE: This version was different than the base `gcc` pkg when last checked
ENV APK_GCC_MINGW64_VERSION="12.2.0-r3"

Expand Down
6 changes: 6 additions & 0 deletions unstable/build/alpine-x86/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
Windows and Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# NOTE: This version was different than the base `gcc` pkg when last checked
ENV APK_GCC_MINGW64_VERSION="12.2.0-r3"

Expand Down
6 changes: 6 additions & 0 deletions unstable/build/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ LABEL org.opencontainers.image.description="Docker container image used to build
golang:rc image or if not recently available, the latest stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

ENV APT_BSDMAINUTILS_VERSION="12.1.8"
ENV APT_TREE_VERSION="2.1.0-1"
ENV XZ_UTILS_VERSION="5.4.1-0.2"
Expand Down
12 changes: 12 additions & 0 deletions unstable/combined/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

FROM golang:1.21.0-bookworm as builder

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# A current dev branch build (mirrored to fork) is used for pre-release Go
# versions, otherwise the latest upstream build of the tool is installed in
# this image.
Expand Down Expand Up @@ -70,6 +76,12 @@ LABEL org.opencontainers.image.description="Docker container image used to lint,
golang:rc image or if not recently available, the latest stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

# Explicitly disable automatic fetching of Go toolchains newer than the
# version explicitly provided by this container image.
#
# https://github.com/atc0005/go-ci/issues/1188
ENV GOTOOLCHAIN="local"

# A current dev branch build (mirrored to fork) is used for pre-release Go
# versions, otherwise the latest upstream build of the tool is installed in
# this image.
Expand Down

0 comments on commit 3b03e50

Please sign in to comment.