From 5f985b36ee999da30c536808840e6a47ff49c5fa Mon Sep 17 00:00:00 2001 From: Federico Tedin Date: Fri, 13 Dec 2024 17:33:51 +0100 Subject: [PATCH] Tweak Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29070c8..9d447d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,12 +17,12 @@ FROM golang:1.21-bullseye AS builder WORKDIR /app COPY . ./ COPY --from=fe-builder /app/pkg/web/build /app/pkg/web/build -RUN go generate pkg/web/web.go && \ - CGO_ENABLED=0 go build -o /bin/quickpizza ./cmd +# Disable CGO in order to build a completely static binary, allowing us to use the binary in a container +# with uses a different distribution of libc. +RUN CGO_ENABLED=0 go build -o /bin/quickpizza ./cmd FROM gcr.io/distroless/static-debian11 COPY --from=builder /bin/quickpizza /bin - EXPOSE 3333 3334 3335 ENTRYPOINT [ "/bin/quickpizza" ]