Skip to content

Instantly share code, notes, and snippets.

@mraaroncruz
Forked from treeder/Dockerfile
Created February 21, 2018 12:20
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 mraaroncruz/b685e59f45f384673a4609a9c5707486 to your computer and use it in GitHub Desktop.
Save mraaroncruz/b685e59f45f384673a4609a9c5707486 to your computer and use it in GitHub Desktop.
multi-stage build
# build stage
FROM golang:alpine AS build-env
ADD . /src
RUN cd /src && go build -o goapp
# final stage
FROM alpine
WORKDIR /app
COPY --from=build-env /src/goapp /app/
ENTRYPOINT ./goapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment