Skip to content

Instantly share code, notes, and snippets.

@geektimus
Created March 9, 2019 23:35
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 geektimus/75b782229d46017d1e130e084d67d78a to your computer and use it in GitHub Desktop.
Save geektimus/75b782229d46017d1e130e084d67d78a to your computer and use it in GitHub Desktop.
FROM golang:1.9.2
WORKDIR /go/src/github.com/geektimus/multi-stage-docker/
COPY main.go .
RUN GOOS=linux go build -o app .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=0 /go/src/github.com/geektimus/multi-stage-docker/app .
CMD ["./app"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment