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 = [
|
|
|
|
"/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
|