Skip to content

Instantly share code, notes, and snippets.

@michaelconnor00
Created August 25, 2016 18:47
Show Gist options
  • Save michaelconnor00/27d3e2e2cd673dbd359bebfdfcee519e to your computer and use it in GitHub Desktop.
Save michaelconnor00/27d3e2e2cd673dbd359bebfdfcee519e to your computer and use it in GitHub Desktop.
docker run --rm -it -v "$GOPATH":/gopath -v "$(pwd)":/app -e "GOPATH=/gopath" -w /app golang:1.4.2 sh -c 'CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o hello'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment