Created
April 8, 2016 11:09
-
-
Save raphink/312ccdb9518d9a861b5988054c85a45f to your computer and use it in GitHub Desktop.
Minimal docker image for go binary
This file contains hidden or 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
| $ CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . | |
| $ strip app | |
| $ docker build . |
This file contains hidden or 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 scratch | |
| ADD app / | |
| CMD ["/app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment