Skip to content

Instantly share code, notes, and snippets.

@Laxman-SM
Forked from katopz/setup-go-swarmkit.sh
Created July 18, 2016 20:01
Show Gist options
  • Save Laxman-SM/b4cfbe01e29395258714df49a14ed7a6 to your computer and use it in GitHub Desktop.
Save Laxman-SM/b4cfbe01e29395258714df49a14ed7a6 to your computer and use it in GitHub Desktop.
Lazy setup go lang for build swarmkit
# Install homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install go.
brew install go
# Export path as homebrew suggest.
echo export PATH=$PATH:/usr/local/opt/go/libexec/bin >> ~/.bashrc
# Export gopath to $HOME/go
echo 'export GOPATH=$HOME/go' >> ~/.bash_profile
# Excute bash_profile.
. ~/.bash_profile
# Make physical path
mkdir go && cd go
# Get the swarmkit sourcecode.
go get -d github.com/docker/swarmkit
# Get in.
cd src/github.com/docker/swarmkit
# Make binaries from that source.
make binaries
# Export swarmkit path.
echo 'export PATH=$PATH:$HOME/go/src/github.com/docker/swarmkit/bin' >> ~/.bash_profile
# Excute bash_profile.
. ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment