Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Restart docker after vagrant tweaking and refactor tweak-code
Browse files Browse the repository at this point in the history
Docker needs to be restarted and not started, since it already starts running after installation
  • Loading branch information
Alfonso Acosta committed Jul 15, 2015
1 parent 7063ca5 commit 2558956
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions test/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion vagrant-common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2558956

Please sign in to comment.