provisioners/docker: search for Docker in multiple paths [GH-4580]
This commit is contained in:
parent
58f7310444
commit
18c76f0a86
|
@ -4,6 +4,7 @@ BUG FIXES:
|
|||
|
||||
- providers/virtualbox: Show a human-friendly error if VirtualBox didn't
|
||||
clean up an existing VM. [GH-4681]
|
||||
- provisioners/docker: Search for docker binary in multiple places. [GH-4580]
|
||||
|
||||
## 1.6.5 (September 4, 2014)
|
||||
|
||||
|
|
|
@ -4,7 +4,19 @@ module VagrantPlugins
|
|||
module Linux
|
||||
module DockerInstalled
|
||||
def self.docker_installed(machine)
|
||||
machine.communicate.test("test -f /usr/bin/docker", sudo: true)
|
||||
paths = [
|
||||
"/usr/bin/docker",
|
||||
"/usr/local/bin/docker",
|
||||
"/usr/sbin/docker",
|
||||
]
|
||||
|
||||
paths.each do |p|
|
||||
if machine.communicate.test("test -f #{p}", sudo: true)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue