diff --git a/Dockerfile b/Dockerfile index 276b68f4..72ed20e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.18 +ARG ALPINE_VERSION=3.16 ARG XX_VERSION=1.1.1 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx -FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base COPY --from=xx / / RUN apk add --no-cache bash coreutils file git ENV GO111MODULE=auto @@ -49,7 +50,7 @@ RUN --mount=from=binary,target=/build \ FROM scratch AS artifact COPY --from=releaser /out / -FROM alpine:3.16 +FROM alpine:${ALPINE_VERSION} RUN apk add --no-cache ca-certificates COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml COPY --from=binary /registry /bin/registry diff --git a/dockerfiles/lint.Dockerfile b/dockerfiles/lint.Dockerfile index 2f24d0d0..51052fa9 100644 --- a/dockerfiles/lint.Dockerfile +++ b/dockerfiles/lint.Dockerfile @@ -1,11 +1,12 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.18 +ARG ALPINE_VERSION=3.16 ARG GOLANGCI_LINT_VERSION=v1.45 FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint -FROM golang:${GO_VERSION}-alpine AS base +FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base RUN apk add --no-cache gcc musl-dev WORKDIR /src diff --git a/dockerfiles/vendor.Dockerfile b/dockerfiles/vendor.Dockerfile index 339b0e33..42cce5ec 100644 --- a/dockerfiles/vendor.Dockerfile +++ b/dockerfiles/vendor.Dockerfile @@ -1,9 +1,10 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.18 +ARG ALPINE_VERSION=3.16 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 git rsync WORKDIR /src