mirror of
https://github.com/nais/wonderwall.git
synced 2026-05-07 00:46:56 +00:00
Building specific file doesn't appear to embed buildinfo into the static binary for some reason.
17 lines
368 B
Docker
17 lines
368 B
Docker
FROM --platform=$BUILDPLATFORM golang:1.21 as builder
|
|
ENV CGO_ENABLED=0
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make wonderwall
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
WORKDIR /app
|
|
COPY --from=builder /src/bin/wonderwall /app/wonderwall
|
|
ENTRYPOINT ["/app/wonderwall"]
|