fix: honor target arch in build

This commit is contained in:
Brad Stein 2026-02-05 15:51:17 -03:00
parent eead06e5c7
commit 1d02a3177d

View File

@ -7,9 +7,11 @@ RUN go mod download
COPY . . COPY . .
ARG TARGETOS=linux ARG TARGETOS
ARG TARGETARCH=amd64 ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \ RUN CGO_ENABLED=0 \
GOOS=${TARGETOS:-linux} \
GOARCH=${TARGETARCH:-$(go env GOARCH)} \
go build -trimpath -ldflags="-s -w" -o /out/soteria ./cmd/soteria go build -trimpath -ldflags="-s -w" -o /out/soteria ./cmd/soteria
FROM gcr.io/distroless/static-debian12:nonroot FROM gcr.io/distroless/static-debian12:nonroot