From 1d02a3177d2fb263c497733a6addf8b0fbfdb962 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Thu, 5 Feb 2026 15:51:17 -0300 Subject: [PATCH] fix: honor target arch in build --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0550aac..d60f34e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,11 @@ RUN go mod download COPY . . -ARG TARGETOS=linux -ARG TARGETARCH=amd64 -RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \ +ARG TARGETOS +ARG TARGETARCH +RUN CGO_ENABLED=0 \ + GOOS=${TARGETOS:-linux} \ + GOARCH=${TARGETARCH:-$(go env GOARCH)} \ go build -trimpath -ldflags="-s -w" -o /out/soteria ./cmd/soteria FROM gcr.io/distroless/static-debian12:nonroot