From 8b6436ecee8d4ad7d4ae9f1e5fcf19812dc92bdf Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 16 Jul 2025 09:46:05 +0200 Subject: [PATCH] Dockerfile: document ALPINE_VERSION build-arg docker build --call outline . TARGET: binary BUILD ARG VALUE DESCRIPTION BASE_VARIANT alpine ALPINE_VERSION 3.21 sets the version of the alpine base image to use, including for the golang image. GO_VERSION 1.24.5 XX_VERSION 1.6.1 GOVERSIONINFO_VERSION v1.4.1 GO_LINKMODE static defines if static or dynamic binary should be produced GO_BUILDTAGS defines additional build tags GO_STRIP strips debugging symbols if set CGO_ENABLED manually sets if cgo is used VERSION sets the version for the produced binary PACKAGER_NAME sets the company that produced the windows binary Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 4 ++++ dockerfiles/Dockerfile.authors | 2 ++ dockerfiles/Dockerfile.dev | 4 ++++ dockerfiles/Dockerfile.lint | 4 ++++ dockerfiles/Dockerfile.vendor | 4 ++++ 5 files changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index f5213cbf18..1b35d5157f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ # syntax=docker/dockerfile:1 ARG BASE_VARIANT=alpine + +# ALPINE_VERSION sets the version of the alpine base image to use, including for the golang image. +# It must be a supported tag in the docker.io/library/alpine image repository +# that's also available as alpine image variant for the Golang version used. ARG ALPINE_VERSION=3.21 ARG BASE_DEBIAN_DISTRO=bookworm diff --git a/dockerfiles/Dockerfile.authors b/dockerfiles/Dockerfile.authors index 35d7928314..e2a25e8416 100644 --- a/dockerfiles/Dockerfile.authors +++ b/dockerfiles/Dockerfile.authors @@ -1,5 +1,7 @@ # syntax=docker/dockerfile:1 +# ALPINE_VERSION sets the version of the alpine base image to use. +# It must be a supported tag in the docker.io/library/alpine image repository. ARG ALPINE_VERSION=3.21 FROM alpine:${ALPINE_VERSION} AS gen diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index 4067f16de8..4b481f2566 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -1,6 +1,10 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.24.5 + +# ALPINE_VERSION sets the version of the alpine base image to use, including for the golang image. +# It must be a supported tag in the docker.io/library/alpine image repository +# that's also available as alpine image variant for the Golang version used. ARG ALPINE_VERSION=3.21 # BUILDX_VERSION sets the version of buildx to install in the dev container. diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index 1f10951328..345943c2e5 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -1,6 +1,10 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.24.5 + +# ALPINE_VERSION sets the version of the alpine base image to use, including for the golang image. +# It must be a supported tag in the docker.io/library/alpine image repository +# that's also available as alpine image variant for the Golang version used. ARG ALPINE_VERSION=3.21 ARG GOLANGCI_LINT_VERSION=v2.1.5 diff --git a/dockerfiles/Dockerfile.vendor b/dockerfiles/Dockerfile.vendor index 4b9cea56b0..e70a592178 100644 --- a/dockerfiles/Dockerfile.vendor +++ b/dockerfiles/Dockerfile.vendor @@ -1,6 +1,10 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.24.5 + +# ALPINE_VERSION sets the version of the alpine base image to use, including for the golang image. +# It must be a supported tag in the docker.io/library/alpine image repository +# that's also available as alpine image variant for the Golang version used. ARG ALPINE_VERSION=3.21 ARG MODOUTDATED_VERSION=v0.8.0