Created
April 19, 2018 00:51
-
-
Save biancarosa/c08c603fc9d55e2408a09aea4695e96b to your computer and use it in GitHub Desktop.
simple-and-small-go-dockerfile
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:latest AS build | |
WORKDIR $GOPATH/{your-repo} | |
COPY . ./ | |
RUN go get github.com/tools/godep | |
RUN godep get | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app . | |
FROM scratch | |
COPY --from=build /app ./ | |
ENTRYPOINT ["./app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment