Sha256: 6a9de77e28722578bb19292491073f2af897496506080188c328947aa5f15c19

Contents?: true

Size: 972 Bytes

Versions: 16

Compression:

Stored size: 972 Bytes

Contents

module VagrantPlugins
  module DockerProvisioner
    class Installer
      def initialize(machine)
        @machine = machine
      end

      # This handles verifying the Docker installation, installing it if it was
      # requested, and so on. This method will raise exceptions if things are
      # wrong.
      def ensure_installed
        if !@machine.guest.capability?(:docker_installed)
          @machine.ui.warn(I18n.t("vagrant.docker_cant_detect"))
          return
        end

        if !@machine.guest.capability(:docker_installed)
          @machine.ui.detail(I18n.t("vagrant.docker_installing"))
          @machine.guest.capability(:docker_install)
        end

        if !@machine.guest.capability(:docker_installed)
          raise DockerError, :install_failed
        end

        if @machine.guest.capability?(:docker_configure_vagrant_user)
          @machine.guest.capability(:docker_configure_vagrant_user)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/provisioners/docker/installer.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/provisioners/docker/installer.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/provisioners/docker/installer.rb
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.9.5.1 plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.9.1.1 plugins/provisioners/docker/installer.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/docker/installer.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/docker/installer.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/docker/installer.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.8.5.2 plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.8.5.1 plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.8.4.2 plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.8.4.1 plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.8.1.2 plugins/provisioners/docker/installer.rb
vagrant-unbundled-1.8.1.1 plugins/provisioners/docker/installer.rb