Created
July 12, 2019 19:06
-
-
Save farhany/6097b937749124d94f1545aed9cbf236 to your computer and use it in GitHub Desktop.
static build with musl (alpine) for go
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
CC=$(which musl-gcc) go build --ldflags '-w -linkmode external -extldflags "-static"' server.go | |
// Source: https://www.reddit.com/r/golang/comments/4cxrcv/whats_the_proper_way_to_build_golang_apps_for/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment