Skip to content

Commit 7a9842b

Browse files
committed
dockerfile: add build args for alpine and go version
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 4629799 commit 7a9842b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# syntax=docker/dockerfile:1
22

3+
ARG GO_VERSION="1.25.4"
4+
ARG ALPINE_VERSION="3.22"
5+
36
# xx is a helper for cross-compilation
47
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.7.0 AS xx
58

6-
FROM --platform=$BUILDPLATFORM golang:1.25.4-alpine3.22 AS builder-base
9+
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder-base
710
COPY --from=xx / /
811
WORKDIR /src
912
RUN --mount=type=cache,target=/go/pkg/mod \

0 commit comments

Comments
 (0)