Skip to content

Commit

Permalink
fix: missing ssl certificates in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
psmarcin committed Oct 7, 2020
1 parent a4c93cf commit 25bc464
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,22 @@ ENV GOOS=linux
ENV GOARCH=amd64
RUN make build-raw

FROM alpine:latest as alpine
RUN apk --no-cache add tzdata zip ca-certificates
WORKDIR /usr/share/zoneinfo
# -0 means no compression. Needed because go's
# tz loader doesn't handle compressed data.
RUN zip -q -r -0 /zoneinfo.zip .

FROM scratch
COPY --from=build-env /app/server /server
COPY --from=build-env /app/web /web

ENV ZONEINFO /zoneinfo.zip
COPY --from=alpine /zoneinfo.zip /
# the tls certificates:
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENV APP_ENV=production

EXPOSE 8080
Expand Down

0 comments on commit 25bc464

Please sign in to comment.