2013-11-26 21:48:51 +00:00
|
|
|
module VagrantPlugins
|
2014-03-26 23:32:31 +00:00
|
|
|
module DockerProvisioner
|
2013-11-26 21:48:51 +00:00
|
|
|
module Cap
|
|
|
|
module Linux
|
|
|
|
module DockerInstalled
|
|
|
|
def self.docker_installed(machine)
|
2014-10-21 23:19:02 +00:00
|
|
|
paths = [
|
2017-03-20 18:38:44 +00:00
|
|
|
"/bin/docker",
|
2014-10-21 23:19:02 +00:00
|
|
|
"/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
|
2013-11-26 21:48:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|