Skip to content

Instantly share code, notes, and snippets.

@dollarkillerx
Last active April 15, 2021 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dollarkillerx/000f2a13f0edc982a6c250c725963c82 to your computer and use it in GitHub Desktop.
Save dollarkillerx/000f2a13f0edc982a6c250c725963c82 to your computer and use it in GitHub Desktop.
docker build golang
docker run -v "$GOPATH":/go --rm -v "$PWD":/go/src/myapp -w /go/src/myapp -e CGO_ENABLED=0 -e GOOS="linux" -e GOARCH="amd64" golang:1.15-alpine go build -ldflags "-s -w" -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment