update go to 1.17.8

Removes the platform based switch between different versions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6119e4ba90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tonis Tiigi 2021-08-16 20:07:43 -07:00 committed by Sebastiaan van Stijn
parent 994ed4085b
commit 30277a8f80
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 8 additions and 16 deletions

View File

@ -1,23 +1,12 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
ARG BASE_VARIANT=alpine ARG BASE_VARIANT=alpine
ARG GO_VERSION=1.16.15 ARG GO_VERSION=1.17.8
ARG XX_VERSION=1.1.0 ARG XX_VERSION=1.1.0
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT} AS gostable
FROM --platform=$BUILDPLATFORM golang:1.17rc1-${BASE_VARIANT} AS golatest
FROM gostable AS go-linux
FROM gostable AS go-darwin
FROM gostable AS go-windows-amd64
FROM gostable AS go-windows-386
FROM gostable AS go-windows-arm
FROM golatest AS go-windows-arm64
FROM go-windows-${TARGETARCH} AS go-windows
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
FROM go-${TARGETOS} AS build-base-alpine FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT} AS build-base-alpine
COPY --from=xx / / COPY --from=xx / /
RUN apk add --no-cache clang lld llvm file git RUN apk add --no-cache clang lld llvm file git
WORKDIR /go/src/github.com/docker/cli WORKDIR /go/src/github.com/docker/cli
@ -27,7 +16,7 @@ ARG TARGETPLATFORM
# gcc is installed for libgcc only # gcc is installed for libgcc only
RUN xx-apk add --no-cache musl-dev gcc RUN xx-apk add --no-cache musl-dev gcc
FROM go-${TARGETOS} AS build-base-buster FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-buster AS build-base-buster
COPY --from=xx / / COPY --from=xx / /
RUN apt-get update && apt-get install --no-install-recommends -y clang lld file RUN apt-get update && apt-get install --no-install-recommends -y clang lld file
WORKDIR /go/src/github.com/docker/cli WORKDIR /go/src/github.com/docker/cli

View File

@ -1,3 +1,6 @@
variable "GO_VERSION" {
default = "1.17.8"
}
variable "VERSION" { variable "VERSION" {
default = "" default = ""
} }

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
ARG GO_VERSION=1.16.15 ARG GO_VERSION=1.17.8
FROM golang:${GO_VERSION}-alpine AS golang FROM golang:${GO_VERSION}-alpine AS golang
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3 # syntax=docker/dockerfile:1.3
ARG GO_VERSION=1.16.15 ARG GO_VERSION=1.17.8
ARG GOLANGCI_LINTER_SHA="v1.21.0" ARG GOLANGCI_LINTER_SHA="v1.21.0"
FROM golang:${GO_VERSION}-alpine AS build FROM golang:${GO_VERSION}-alpine AS build