Skip to content

Commit

Permalink
make sure app image also has glibc
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldracula committed Oct 18, 2023
1 parent 06ee10d commit 5a44dbb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 5a44dbb

Please sign in to comment.