Dockerfile: use GOTOOLCHAIN=local

This may find its way into the official images, but until it does, let's
make sure we don't get unexpected updates of go.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-09-26 12:43:38 +02:00
parent 8d1ddffb83
commit e9759cee69
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
5 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,7 @@ ARG BUILDX_VERSION=0.11.2
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build-base-alpine
ENV GOTOOLCHAIN=local
COPY --link --from=xx / /
RUN apk add --no-cache bash clang lld llvm file git
WORKDIR /go/src/github.com/docker/cli
@ -21,6 +22,7 @@ ARG TARGETPLATFORM
RUN xx-apk add --no-cache musl-dev gcc
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-bullseye
ENV GOTOOLCHAIN=local
COPY --link --from=xx / /
RUN apt-get update && apt-get install --no-install-recommends -y bash clang lld llvm file
WORKDIR /go/src/github.com/docker/cli

View File

@ -7,7 +7,8 @@ ARG BUILDX_VERSION=0.11.2
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golang
ENV CGO_ENABLED=0
ENV GOTOOLCHAIN=local
ENV CGO_ENABLED=0
FROM golang AS gofumpt
ARG GOFUMPT_VERSION=v0.4.0

View File

@ -7,6 +7,7 @@ ARG GOLANGCI_LINT_VERSION=v1.54.2
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
ENV GOTOOLCHAIN=local
ENV GO111MODULE=off
ENV CGO_ENABLED=0
ENV GOGC=75

View File

@ -5,6 +5,7 @@ ARG ALPINE_VERSION=3.17
ARG MODOUTDATED_VERSION=v0.8.0
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
ENV GOTOOLCHAIN=local
RUN apk add --no-cache bash git rsync
WORKDIR /src

View File

@ -3,6 +3,7 @@
ARG GO_VERSION=1.20.8
FROM golang:${GO_VERSION}-alpine AS generated
ENV GOTOOLCHAIN=local
RUN go install github.com/dmcgowan/quicktls@master
WORKDIR /tmp/gencerts/notary
RUN --mount=type=bind,source=e2e/testdata/notary,target=/tmp/gencerts/notary,rw <<EOT