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