Skip to content

Instantly share code, notes, and snippets.

@ukautz
Last active July 1, 2019 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukautz/b4b6fa6bd9c95e8fb83dd57c115fd59b to your computer and use it in GitHub Desktop.
Save ukautz/b4b6fa6bd9c95e8fb83dd57c115fd59b to your computer and use it in GitHub Desktop.
Install Go tooling from clean docker container
#!/bin/bash
if [ $# != 1 ]; then
echo "Usage: $0 <golang-package>"
echo " for example:"
echo " $0 github.com/gobuffalo/packr/packr"
exit 1
fi
docker run --rm \
--name go-tool-install \
-e GOPATH=/build \
-w /build \
-v /usr/local/bin:/build/bin \
golang:latest \
go get -u -v $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment