Skip to content

Instantly share code, notes, and snippets.

@giautm
Last active December 26, 2020 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giautm/89bedcb791c58d8dd8609bd4940ed0ce to your computer and use it in GitHub Desktop.
Save giautm/89bedcb791c58d8dd8609bd4940ed0ce to your computer and use it in GitHub Desktop.
Minimum (size: 1.31MB) Dockerfile for production with SSL certificates and Timezone data
nobody:x:65534:65534:nobody:/:
FROM alpine AS builder
RUN apk --no-cache add tzdata
FROM scratch
ARG SERVICE
COPY ./builders/passwd /etc/passwd
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
USER nobody
COPY ./bin/${SERVICE} /server
ENV PORT 8080
ENTRYPOINT ["/server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment