Last active
October 28, 2015 19:12
-
-
Save treeder/5478e78201b2a246c0a4 to your computer and use it in GitHub Desktop.
Cross compiling golang with Docker
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/src/github.com/iron-io/ironcli golang:1.4.2-cross 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