Skip to content

Commit

Permalink
Container Image Enhancements
Browse files Browse the repository at this point in the history
Use Multi=Stage Builds to get certificats
Use scratch as base image to reduce size and attack surface
  • Loading branch information
sleeping-barber committed May 13, 2020
1 parent 86166c0 commit ca914e2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM alpine
FROM alpine as build

RUN apk add --no-cache ca-certificates
RUN apk add --update --no-cache ca-certificates

FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY github-weather /bin/github-weather

ENTRYPOINT ["/bin/github-weather"]
ENTRYPOINT ["/bin/github-weather"]

0 comments on commit ca914e2

Please sign in to comment.