Skip to content

Instantly share code, notes, and snippets.

@gjohnson
Created September 23, 2016 09:42
Show Gist options
  • Save gjohnson/c7883f139a6bd8a3da999db1dad2d750 to your computer and use it in GitHub Desktop.
Save gjohnson/c7883f139a6bd8a3da999db1dad2d750 to your computer and use it in GitHub Desktop.
docker run --rm -it -v "${GOPATH}":/gopath -v "$(CURDIR)":/app -e "GOPATH=/gopath" -w /app golang:1.7 sh -c 'CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o app'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment