class Kitchen::Driver::Docker
@author Sean Porter <portertech@gmail.com>
Public Instance Methods
Source
# File lib/kitchen/driver/docker.rb, line 124 def create(state) container.create(state) wait_for_transport(state) end
Source
# File lib/kitchen/driver/docker.rb, line 142 def default_image platform, release = instance.platform.name.split('-') if platform == 'centos' && release release = 'centos' + release.split('.').first end release ? [platform, release].join(':') : platform end
Source
# File lib/kitchen/driver/docker.rb, line 150 def default_platform instance.platform.name.split('-').first end
Source
# File lib/kitchen/driver/docker.rb, line 130 def destroy(state) container.destroy(state) end
Source
# File lib/kitchen/driver/docker.rb, line 118 def verify_dependencies run_command("#{config[:binary]} >> #{dev_null} 2>&1", quiet: true, use_sudo: config[:use_sudo]) rescue raise UserError, 'You must first install the Docker CLI tool https://www.docker.com/get-started' end
Source
# File lib/kitchen/driver/docker.rb, line 134 def wait_for_transport(state) if config[:wait_for_transport] instance.transport.connection(state) do |conn| conn.wait_until_ready end end end
Protected Instance Methods
Source
# File lib/kitchen/driver/docker.rb, line 156 def container @container ||= if windows_os? Kitchen::Docker::Container::Windows.new(config) else Kitchen::Docker::Container::Linux.new(config) end @container end