Created
August 15, 2017 23:00
-
-
Save TripleDogDare/bea0e52166da1fea3f992a938c037770 to your computer and use it in GitHub Desktop.
statically linked builds of go binaries
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
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -tags netgo -installsuffix netgo main.go | |
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' main.go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment