Merge pull request #712 from errordeveloper/vagrantfile-more-cleanup
Improve readability of Vagrantfile and cleanup this official image
This commit is contained in:
commit
c63d2e531a
3 files changed
+88
-29
No files matched your search
Vendored
+5
-5
@@ -9,8 +9,10 @@ n_machines = 2
|
||||
ip_prefix = "192.168.48"
|
||||
ip_suffix_base = 10
|
||||
|
||||
require '../vagrant-common.rb'
|
||||
|
||||
def configure_docker(host, hostname, ip)
|
||||
pkgs = "lxc-docker ethtool"
|
||||
pkgs = %w(lxc-docker ethtool)
|
||||
|
||||
host.vm.box = "ubuntu/ubuntu-14.10-amd64"
|
||||
host.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-amd64-vagrant-disk1.box"
|
||||
@@ -23,15 +25,13 @@ def configure_docker(host, hostname, ip)
|
||||
host.vm.provision :shell, :inline => "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9"
|
||||
host.vm.provision :shell, :inline => "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
|
||||
|
||||
pkg_cmd = "apt-get update -qq; " \
|
||||
"apt-get install -q -y --force-yes --no-install-recommends "
|
||||
pkg_cmd << pkgs
|
||||
host.vm.provision :shell, :inline => pkg_cmd
|
||||
install_packages host.vm, pkgs
|
||||
host.vm.provision :shell, :inline => "usermod -a -G docker vagrant; "
|
||||
|
||||
# Listen on the remote API
|
||||
host.vm.provision :shell, :inline => "echo 'DOCKER_OPTS=\"-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375\"' >> /etc/default/docker"
|
||||
host.vm.provision :shell, :inline => "service docker restart"
|
||||
cleanup(host.vm)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user