Skip to content

Instantly share code, notes, and snippets.

@pedrodelgallego
Last active July 25, 2017 10:25
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 pedrodelgallego/1a4ae10f71b4a6aa255058959e3d7ef3 to your computer and use it in GitHub Desktop.
Save pedrodelgallego/1a4ae10f71b4a6aa255058959e3d7ef3 to your computer and use it in GitHub Desktop.
# 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
@pedrodelgallego
Copy link
Author

Multistage golang dockerfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment