File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1- FROM snowdreamtech/golang:1.23.5-alpine3.21 AS builder
1+ FROM --platform=$BUILDPLATFORM snowdreamtech/golang:1.23.7-alpine3.21 AS builder
2+
3+ ARG TARGETOS
4+ ARG TARGETARCH
25
36# Switch to the user
47USER root
@@ -38,13 +41,13 @@ RUN go mod tidy \
3841 && LDGOFLAGS="${LDGOFLAGS} -X '${CmdPath}.GitTag=${GitTag}'" \
3942 && LDGOFLAGS="${LDGOFLAGS} -X '${CmdPath}.COPYRIGHT=${COPYRIGHT}'" \
4043 && LDGOFLAGS="${LDGOFLAGS} -X '${CmdPath}.LICENSE=${LICENSE}'" \
41- && go build -trimpath -ldflags "${LDGOFLAGS} -s -w" -v -o gserver
44+ && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -ldflags "${LDGOFLAGS} -s -w" -v -o gserver
4245
4346
4447
4548
4649
47- FROM snowdreamtech/alpine:3.21.0
50+ FROM snowdreamtech/alpine:3.21.3
4851
4952# OCI annotations to image
5053LABEL org.opencontainers.image.authors="Snowdream Tech" \
Original file line number Diff line number Diff line change 1- FROM snowdreamtech/golang:1.23.5-bookworm AS builder
1+ FROM --platform=$BUILDPLATFORM snowdreamtech/golang:1.23.5-bookworm AS builder
2+
3+ ARG TARGETOS
4+ ARG TARGETARCH
25
36# Switch to the user
47USER root
@@ -45,14 +48,14 @@ RUN go mod tidy \
4548 && LDGOFLAGS="${LDGOFLAGS} -X '${CmdPath}.GitTag=${GitTag}'" \
4649 && LDGOFLAGS="${LDGOFLAGS} -X '${CmdPath}.COPYRIGHT=${COPYRIGHT}'" \
4750 && LDGOFLAGS="${LDGOFLAGS} -X '${CmdPath}.LICENSE=${LICENSE}'" \
48- && go build -trimpath -ldflags "${LDGOFLAGS} -s -w" -v -o gserver
51+ && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -ldflags "${LDGOFLAGS} -s -w" -v -o gserver
4952
5053
5154
5255
5356
5457
55- FROM snowdreamtech/debian:12.8 .0
58+ FROM snowdreamtech/debian:12.10 .0
5659
5760# OCI annotations to image
5861LABEL org.opencontainers.image.authors="Snowdream Tech" \
You can’t perform that action at this time.
0 commit comments