Created
July 4, 2014 21:24
-
-
Save YungSang/5dbb2295434cb5ce7fc0 to your computer and use it in GitHub Desktop.
Install nsinit on boot2docker
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 : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define "boot2docker-nsinit" | |
config.vm.box = "yungsang/boot2docker" | |
config.vm.box_version = "1.1.0" | |
config.vm.provision :shell do |s| | |
s.privileged = false | |
s.inline = <<-EOT | |
tce-load -wil compiletc 2> /dev/null | |
echo "Installing go" | |
cd /tmp | |
curl -sOL http://golang.org/dl/go1.3.linux-386.tar.gz | |
cd /var/lib/boot2docker | |
sudo tar zxf /tmp/go1.3.linux-386.tar.gz | |
export GOROOT=/var/lib/boot2docker/go | |
export PATH=$PATH:$GOROOT/bin | |
echo "Installing nsinit" | |
cd $HOME | |
export GOPATH=$HOME/go | |
go get -d github.com/docker/libcontainer/nsinit | |
cd $GOPATH/src/github.com/docker/libcontainer | |
git checkout -B nsinit v1.1.0 | |
cd $GOPATH/src/github.com/docker/libcontainer/nsinit | |
go install . | |
sudo cp -f $GOPATH/bin/nsinit /usr/local/bin/nsinit | |
echo "Installing docker-nsinit" | |
cd $HOME | |
curl -sOL https://raw.githubusercontent.com/YungSang/docker-attach/master/docker-nsinit | |
chmod +x docker-nsinit | |
sudo mv docker-nsinit /usr/local/bin/docker-nsinit | |
EOT | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment