From 5a44dbb371c33d2c0efeab24da38bd3496f6c383 Mon Sep 17 00:00:00 2001 From: Zach Mandeville Date: Wed, 18 Oct 2023 21:24:01 +1300 Subject: [PATCH] make sure app image also has glibc --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1ab4b8..e0bb5fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,10 @@ WORKDIR /usr/src/app COPY . . # get ssl certs to copy into scratch image, as it won't have them by default. RUN apt update && apt-get install git ca-certificates && update-ca-certificates -RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -v -o /usr/local/bin/crossposting-service ./cmd/crossposting-service +RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -v -o /crossposting-service ./cmd/crossposting-service - -FROM scratch as app +FROM gcr.io/distroless/cc-debian12 WORKDIR / COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=build /usr/local/bin/crossposting-service /crossposting-service +COPY --from=build /crossposting-service /crossposting-service CMD ["/crossposting-service"]