Created
July 17, 2018 09:54
-
-
Save gaoconghui/66bc4699c624f5a5833db42c08c0c55d to your computer and use it in GitHub Desktop.
使用docker环境来build go
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
docker run --rm -it -v "$GOPATH":/go -w /go/build/path dockercore/golang-cross:1.10.2 sh -c ' | |
for GOOS in darwin linux windows; do | |
for GOARCH in 386 amd64; do | |
echo "Building $GOOS-$GOARCH" | |
export GOOS=$GOOS | |
export GOARCH=$GOARCH | |
go build -o bin/ironcli-$GOOS-$GOARCH | |
done | |
done | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment