Sha256: bf43be38a6d9056808b3721364a298717c346dc9d970389c723e1e2d291e7a5e

Contents?: true

Size: 1.08 KB

Versions: 46

Compression:

Stored size: 1.08 KB

Contents

module VagrantPlugins
  module DockerProvisioner
    module Cap
      module Redhat
        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("curl -sSL https://get.docker.com/ | sh")
            end

            case machine.guest.capability("flavor")
            when :rhel_7
              docker_enable_rhel7(machine)
            else
              docker_enable_default(machine)
            end
          end

          def self.docker_enable_rhel7(machine)
            machine.communicate.tap do |comm|
              comm.sudo("systemctl start docker.service")
              comm.sudo("systemctl enable docker.service")
            end
          end

          def self.docker_enable_default(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

46 entries across 42 versions & 5 rubygems

Version Path
vagrant-unbundled-2.2.7.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.6.2 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.6.1 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.6.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.5.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.4.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.3.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.2.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.2.0.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.1.4.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.1.2.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.1.1.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.0.4.0 plugins/provisioners/docker/cap/redhat/docker_install.rb
vagrant-unbundled-2.0.3.0 plugins/provisioners/docker/cap/redhat/docker_install.rb