fix: honor target arch in build
This commit is contained in:
parent
eead06e5c7
commit
1d02a3177d
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user