mirror of https://github.com/docker/cli.git
Merge pull request #3896 from thaJeztah/add_alpine_version
Dockerfile: add ALPINE_VERSION build-arg
This commit is contained in:
commit
7240f70808
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
ARG BASE_VARIANT=alpine
|
ARG BASE_VARIANT=alpine
|
||||||
ARG GO_VERSION=1.19.3
|
ARG GO_VERSION=1.19.3
|
||||||
|
ARG ALPINE_VERSION=3.16
|
||||||
ARG XX_VERSION=1.1.1
|
ARG XX_VERSION=1.1.1
|
||||||
ARG GOVERSIONINFO_VERSION=v1.3.0
|
ARG GOVERSIONINFO_VERSION=v1.3.0
|
||||||
ARG GOTESTSUM_VERSION=v1.8.2
|
ARG GOTESTSUM_VERSION=v1.8.2
|
||||||
|
@ -9,7 +10,7 @@ ARG BUILDX_VERSION=0.9.0
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
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 / /
|
COPY --from=xx / /
|
||||||
RUN apk add --no-cache bash clang lld llvm file git
|
RUN apk add --no-cache bash clang lld llvm file git
|
||||||
WORKDIR /go/src/github.com/docker/cli
|
WORKDIR /go/src/github.com/docker/cli
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM alpine:3.14 AS gen
|
ARG ALPINE_VERSION=3.16
|
||||||
|
|
||||||
|
FROM alpine:${ALPINE_VERSION} AS gen
|
||||||
RUN apk add --no-cache bash git
|
RUN apk add --no-cache bash git
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
RUN --mount=type=bind,target=. \
|
RUN --mount=type=bind,target=. \
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.19.3
|
ARG GO_VERSION=1.19.3
|
||||||
|
ARG ALPINE_VERSION=3.16
|
||||||
|
|
||||||
ARG BUILDX_VERSION=0.9.0
|
ARG BUILDX_VERSION=0.9.0
|
||||||
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx
|
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine AS golang
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golang
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
FROM golang AS gofumpt
|
FROM golang AS gofumpt
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.19.3
|
ARG GO_VERSION=1.19.3
|
||||||
|
ARG ALPINE_VERSION=3.16
|
||||||
ARG GOLANGCI_LINT_VERSION=v1.49.0
|
ARG GOLANGCI_LINT_VERSION=v1.49.0
|
||||||
|
|
||||||
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine AS lint
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS lint
|
||||||
ENV GO111MODULE=off
|
ENV GO111MODULE=off
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
ENV GOGC=75
|
ENV GOGC=75
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
ARG GO_VERSION=1.19.3
|
ARG GO_VERSION=1.19.3
|
||||||
|
ARG ALPINE_VERSION=3.16
|
||||||
ARG MODOUTDATED_VERSION=v0.8.0
|
ARG MODOUTDATED_VERSION=v0.8.0
|
||||||
|
|
||||||
FROM golang:${GO_VERSION}-alpine AS base
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
|
||||||
RUN apk add --no-cache bash git rsync
|
RUN apk add --no-cache bash git rsync
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue