Dockerfile: add ALPINE_VERSION build-arg

This allows us to pin to a specific version of Alpine, in case the
golang:alpine image switches to a newer version, which may at times
be incompatible, e.g. see https://github.com/moby/moby/issues/44570

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-12-04 14:01:30 +01:00
parent 64c8976745
commit 1b0d6fc804
5 changed files with 11 additions and 5 deletions

View File

@ -1,11 +1,12 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.19.3
ARG ALPINE_VERSION=3.16
ARG BUILDX_VERSION=0.9.0
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
FROM golang AS gofumpt