changed the docker version in vagrant to pull down latest version, moved some things around and put docker and dockerd into /usr/local/bin now. Also added git to install package list

This commit is contained in:
Ken Cochrane 2013-03-11 17:48:39 -07:00
parent 43875a73a0
commit d4da0a0ddb
1 changed files with 12 additions and 5 deletions

View File

@ -1,14 +1,15 @@
class docker {
# update this with latest docker binary distro
$docker_url = "https://dl.dropbox.com/u/20637798/docker.tar.gz"
$docker_url = "http://docker.io.s3.amazonaws.com/builds/$kernel/$hardwaremodel/docker-master.tgz"
# update this with latest go binary distry
$go_url = "http://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz"
Package { ensure => "installed" }
package { ["lxc", "debootstrap", "wget", "bsdtar"]: }
package { ["lxc", "debootstrap", "wget", "bsdtar", "git"]: }
notify { "docker_url = $docker_url": withpath => true }
exec { "debootstrap" :
require => Package["debootstrap"],
@ -26,7 +27,7 @@ class docker {
exec { "fetch-docker" :
require => Package["wget"],
command => "/usr/bin/wget -O - $docker_url | /bin/tar xz -C /home/vagrant",
creates => "/home/vagrant/docker/dockerd"
creates => "/home/vagrant/docker-master"
}
file { "/etc/init/dockerd.conf":
@ -39,10 +40,16 @@ class docker {
exec { "copy-docker-bin" :
require => Exec["fetch-docker"],
command => "/bin/cp /home/vagrant/docker/docker /usr/local/bin",
command => "/bin/cp /home/vagrant/docker-master/docker /usr/local/bin",
creates => "/usr/local/bin/docker"
}
exec { "copy-dockerd-bin" :
require => Exec["fetch-docker"],
command => "/bin/cp /home/vagrant/docker-master/dockerd /usr/local/bin",
creates => "/usr/local/bin/dockerd"
}
service { "dockerd" :
ensure => "running",
start => "/sbin/initctl start dockerd",