2013-12-12 17:16:59 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Docker
|
|
|
|
module Cap
|
|
|
|
module Redhat
|
|
|
|
module DockerInstall
|
|
|
|
def self.docker_install(machine, version)
|
2013-12-14 00:56:13 +00:00
|
|
|
if version != :latest
|
|
|
|
machine.ui.warn(I18n.t("vagrant.docker_install_with_version_not_supported"))
|
|
|
|
end
|
|
|
|
|
2013-12-12 17:16:59 +00:00
|
|
|
machine.communicate.tap do |comm|
|
2013-12-14 00:28:51 +00:00
|
|
|
if ! comm.test("rpm -qa | grep epel-release")
|
|
|
|
comm.sudo("rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm")
|
|
|
|
end
|
2013-12-12 17:16:59 +00:00
|
|
|
comm.sudo("yum -y upgrade")
|
|
|
|
comm.sudo("yum -y install docker-io")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|