Last active
August 29, 2015 14:22
-
-
Save eldondevcg/3156651bfa8da84d6bf7 to your computer and use it in GitHub Desktop.
A vagrantfile which gets the latest go source (required by goxc), builds it, installs goxc, godep, and docker from the docker debian repo
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provider "virtualbox" do |v| | |
v.memory = 4096 | |
v.cpus = 2 | |
end | |
config.vm.provision "shell", privileged: false, inline: <<-SHELL | |
sudo apt-get update | |
sudo apt-get install -y git | |
git clone https://go.googlesource.com/go | |
cd go | |
git checkout go1.4.2 | |
cd src | |
bash make.bash | |
echo "export PATH=\$PATH:\$HOME/go/bin:$HOME/bin" >>~/.profile | |
echo "export GOPATH=\$HOME" >>~/.profile | |
echo $SHELL | |
echo $PATH | |
. ~/.profile | |
go get github.com/laher/goxc | |
go get github.com/tools/godep | |
go get golang.org/x/tools/cmd/vet | |
goxc -bc="linux,darwin" -t | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual | |
sudo apt-get install -y lxc-docker debootstrap | |
sudo usermod -a -G docker vagrant | |
cd | |
mkdir trusty | |
sudo debootstrap --variant=minbase --components=main,universe --include=inetutils-ping,iproute2,wget,tar,git,ca-certificates trusty trusty | |
cd trusty | |
sudo tar -c . |sudo docker import - trusty | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment