Reduction of 352 MiB -> 8.22 MiB Reviewed-on: #29 Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
15 lines
298 B
Docker
15 lines
298 B
Docker
FROM golang:1.23-alpine as build
|
|
|
|
ARG GOARCH=amd64
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} \
|
|
go build -trimpath -ldflags="-s -w" -o main .
|
|
|
|
FROM gcr.io/distroless/static-debian12
|
|
COPY --from=build /app/main /
|
|
CMD ["/main"]
|