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:
1 parent
7063ca51aa
commit
25589562cd
2 files changed
+3
-10
No files matched your search
Vendored
+2
-9
@@ -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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user