Skip to content

Instantly share code, notes, and snippets.

@takumakei
Created June 23, 2020 05:50
Show Gist options
  • Save takumakei/28b1a1c5c83953710f203048bf685371 to your computer and use it in GitHub Desktop.
Save takumakei/28b1a1c5c83953710f203048bf685371 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
GOLANG_IMAGE="golang:1.14.4-alpine3.12"
cat <<EOF | docker run -i --rm -v ${PWD}:/build ${GOLANG_IMAGE} sh
apk add --no-cache gcc musl-dev git
git clone --shallow-since=2020/06/07 https://github.com/cosmos72/gomacro.git /go/src/github.com/cosmos72/gomacro
cd /go/src/github.com/cosmos72/gomacro
git checkout 647446f
env CGO_ENABLED=1 go install -tags netgo -installsuffix netgo --ldflags '-extldflags "-static"'
cp /go/bin/gomacro /build/
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment