Sha256: 6ca1e4fcebcabf0a1c373310539f856c5c5e7902e7c16a976a3570203c0fe11c
Contents?: true
Size: 1.28 KB
Versions: 12
Compression:
Stored size: 1.28 KB
Contents
module VagrantPlugins module DockerProvisioner module Cap module Centos module DockerInstall def self.docker_install(machine) machine.communicate.tap do |comm| comm.sudo("yum -q -y update") comm.sudo("yum -q -y remove docker-io* || true") comm.sudo("yum install -y -q yum-utils") comm.sudo("yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo") comm.sudo("yum makecache") comm.sudo("yum install -y -q docker-ce") end case machine.guest.capability("flavor") when :centos docker_enable_service(machine) else docker_enable_systemctl(machine) end end def self.docker_enable_systemctl(machine) machine.communicate.tap do |comm| comm.sudo("systemctl start docker.service") comm.sudo("systemctl enable docker.service") end end def self.docker_enable_service(machine) machine.communicate.tap do |comm| comm.sudo("service docker start") comm.sudo("chkconfig docker on") end end end end end end end
Version data entries
12 entries across 12 versions & 3 rubygems