diff --git a/Dockerfile b/Dockerfile index a8ca4942ad..c3d502fd2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,12 @@ ARG BASE_VARIANT=alpine ARG GO_VERSION=1.18.8 +ARG ALPINE_VERSION=3.16 ARG XX_VERSION=1.1.0 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx -FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT} AS build-base-alpine +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build-base-alpine COPY --from=xx / / RUN apk add --no-cache clang lld llvm file git WORKDIR /go/src/github.com/docker/cli diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index 7d37ace420..6a031868c5 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -1,8 +1,9 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.18.8 +ARG ALPINE_VERSION=3.16 -FROM golang:${GO_VERSION}-alpine AS golang +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golang ENV CGO_ENABLED=0 FROM golang AS esc diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index 719fd037f7..cb632c9527 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -1,9 +1,10 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.18.8 +ARG ALPINE_VERSION=3.16 ARG GOLANGCI_LINT_VERSION=v1.45.2 -FROM golang:${GO_VERSION}-alpine AS build +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS build ENV CGO_ENABLED=0 RUN apk add --no-cache git ARG GOLANGCI_LINT_VERSION @@ -12,7 +13,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} -FROM golang:${GO_VERSION}-alpine AS lint +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint ENV GO111MODULE=off ENV CGO_ENABLED=0 ENV DISABLE_WARN_OUTSIDE_CONTAINER=1