Skip to content

Commit a81ae5c

Browse files
committed
fix release docker binary selection
1 parent 300b0bf commit a81ae5c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Dockerfile.release

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# syntax=docker/dockerfile:1.7
22

3-
ARG TARGETOS=linux
4-
ARG TARGETARCH
5-
63
FROM alpine:3.21 AS binary
74

8-
ARG TARGETOS
9-
ARG TARGETARCH
10-
115
RUN --mount=type=bind,source=dist,target=/dist,readonly \
12-
cp "/dist/${TARGETOS}-${TARGETARCH}/git-plus" /git-plus
6+
arch="$(uname -m)" && \
7+
case "${arch}" in \
8+
x86_64) binary_arch="amd64" ;; \
9+
aarch64) binary_arch="arm64" ;; \
10+
*) echo "Unsupported architecture: ${arch}" >&2; exit 1 ;; \
11+
esac && \
12+
cp "/dist/linux-${binary_arch}/git-plus" /git-plus
1313

1414
FROM gcr.io/distroless/static-debian12:nonroot
1515

0 commit comments

Comments
 (0)