Skip to content

Instantly share code, notes, and snippets.

@bneil
Last active May 8, 2019 17:23
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 bneil/f4ee2e76a14cf45218e675386e878068 to your computer and use it in GitHub Desktop.
Save bneil/f4ee2e76a14cf45218e675386e878068 to your computer and use it in GitHub Desktop.
My typical golang dockerfile
# ======================== [ Create GoLang Builder ]
FROM golang:1.12 AS builder
COPY . /app
WORKDIR /app
RUN make release && pwd && ls
# ======================== [ Create Final ]
FROM gcr.io/distroless/base
COPY templates/ /templates/
COPY static/ /static/
COPY conf/ /conf/
COPY --from=builder /app/thing-amd64 /thing
ENV ENVIRONMENT dev
EXPOSE 3000
ENTRYPOINT ["/thing"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment