mirror of https://github.com/docker/cli.git
Merge pull request #3897 from thaJeztah/20.10_backport_add_alpine_version
[20.10 backport] Dockerfile: add ALPINE_VERSION build-arg
This commit is contained in:
commit
9124a42b40
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue