Created
October 9, 2018 10:33
-
-
Save Eun/1d532bec3168cd9ad3f2125384c97590 to your computer and use it in GitHub Desktop.
cross compile golang using alpine
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
#!/bin/bash | |
PWD=$(pwd) | |
if [ -n "${PWD##*$GOPATH*}" ]; then | |
echo "$PWD not in $GOPATH" | |
exit 1 | |
fi | |
P=${PWD:${#GOPATH}} | |
P=/go/${P#/} | |
docker run --rm -it --volume $PWD:$P -w $P golang:1.10.3-alpine sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment