mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-08 16:26:25 -04:00
provisioners/docker: configure autostart works if OS can't check status
This commit is contained in:
parent
ac8d54132b
commit
544f404037
1 changed files with 9 additions and 3 deletions
|
|
@ -13,9 +13,15 @@ module VagrantPlugins
|
|||
# Wait some amount time for the pid to become available
|
||||
# so that we don't start executing Docker commands until
|
||||
# it is available.
|
||||
[0, 1, 2, 4].each do |delay|
|
||||
sleep delay
|
||||
break if machine.guest.capability(:docker_daemon_running)
|
||||
if machine.guest.capability?(:docker_daemon_running)
|
||||
[0, 1, 2, 4].each do |delay|
|
||||
sleep delay
|
||||
break if machine.guest.capability(:docker_daemon_running)
|
||||
end
|
||||
else
|
||||
# This OS doesn't support checking if Docker is running,
|
||||
# so just wait 5 seconds.
|
||||
sleep 5
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue