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