Reviewed-on: #89 Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
15 lines
460 B
Docker
15 lines
460 B
Docker
FROM docker.io/library/golang:1.25-alpine@sha256:26111811bc967321e7b6f852e914d14bede324cd1accb7f81811929a6a57fea9 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@sha256:4b2a093ef4649bccd586625090a3c668b254cfe180dee54f4c94f3e9bd7e381e
|
|
COPY --from=build /app/main /
|
|
CMD ["/main"]
|