Created
October 2, 2018 09:22
-
-
Save Aracki/c70c32d2da5807e3ef6dcb04c47388cc to your computer and use it in GitHub Desktop.
Countgo - Dockerfile with multi-stage build used to deploy GoLang app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.10.3-alpine as builder | |
WORKDIR $GOPATH/src/github.com/aracki/countgo | |
COPY . . | |
ENV GOBIN $GOPATH/bin | |
RUN GOOS=linux GOARCH=386 go install cmd/aracki/main.go | |
FROM scratch as appgo | |
COPY --from=builder /go/bin/main /go/bin/main | |
COPY mongo_config.yml mongo_config.yml | |
ENTRYPOINT ["/go/bin/main"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment