Files
wonderwall/Dockerfile
Trong Huu Nguyen acede833c8 build: use defacto image, build module for buildinfo
Building specific file doesn't appear to embed buildinfo into the static
binary for some reason.
2023-11-28 16:15:51 +01:00

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"]