Restart docker after vagrant tweaking and refactor tweak-code

Docker needs to be restarted and not started, since it already starts running after installation
This commit is contained in:
Alfonso Acosta committed 2015-07-15 09:31:47 +00:00
1 parent 7063ca51aa
commit 25589562cd
2 files changed
+3 -10

No files matched your search

+2 -9
View File
@@ -26,15 +26,8 @@ def configure_docker(host, hostname, ip)
host.vm.provision :shell, :inline => "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
install_packages host.vm, pkgs
host.vm.provision :shell, :inline => "usermod -a -G docker vagrant; "
# Listen on the remote API and use overlay storage driver
host.vm.provision :shell, :inline => "sed -i -e's%-H fd://%-H fd:// -H tcp://0.0.0.0:2375 -s overlay%' /lib/systemd/system/docker.service"
host.vm.provision :shell, :inline => "systemctl daemon-reload"
host.vm.provision :shell, :inline => "systemctl restart docker"
host.vm.provision :shell, :inline => "systemctl enable docker"
cleanup(host.vm)
tweak_docker_daemon host.vm
cleanup host.vm
end
def configure_resolv_conf(host)
+1 -1
View File
@@ -47,7 +47,7 @@ def tweak_docker_daemon(vm)
usermod -a -G docker vagrant
sed -i -e's%-H fd://%-H fd:// -H tcp://0.0.0.0:2375 -s overlay%' /lib/systemd/system/docker.service
systemctl daemon-reload
systemctl start docker
systemctl restart docker
systemctl enable docker
SCRIPT
end