mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-23 21:16:14 +00:00
build: use defacto image, build module for buildinfo
Building specific file doesn't appear to embed buildinfo into the static binary for some reason.
This commit is contained in:
+4
-3
@@ -1,4 +1,5 @@
|
||||
FROM --platform=$BUILDPLATFORM golang:1.21-alpine as builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.21 as builder
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
@@ -7,9 +8,9 @@ RUN go mod download
|
||||
COPY . .
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -trimpath -ldflags "-s -w" -a -o bin/wonderwall cmd/wonderwall/main.go
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make wonderwall
|
||||
|
||||
FROM gcr.io/distroless/static-debian11:nonroot
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
WORKDIR /app
|
||||
COPY --from=builder /src/bin/wonderwall /app/wonderwall
|
||||
ENTRYPOINT ["/app/wonderwall"]
|
||||
|
||||
Reference in New Issue
Block a user