Skip to content

Commit 92dfefa

Browse files
authored
Merge pull request #964 from crazy-max/go_version_buildarg
dockerfile: add build args for alpine and go version
2 parents ac733dc + 7a9842b commit 92dfefa

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)