Class: Dockerspec::Runner::Serverspec::Docker
- Includes:
- Base
- Defined in:
- lib/dockerspec/runner/serverspec/docker.rb
Overview
Runs a Docker container using Serverspec.
Constant Summary
Constants inherited from Docker
Constants inherited from Base
Instance Attribute Summary
Attributes included from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#container ⇒ Docker::Container
Gets the internal Docker::Container object.
-
#initialize(*opts) ⇒ Dockerspec::Runner::Serverspec::Docker
constructor
Constructs a Docker Serverspec runner class to run Docker images.
Methods included from Base
Methods inherited from Docker
Methods included from Helper::MultipleSourcesDescription
Methods inherited from Base
#container_name, #finalize, #id, #image_id, #ipaddress, #restore_rspec_context, #run
Methods included from ConfigHelpers
Constructor Details
#initialize(*opts) ⇒ Dockerspec::Runner::Serverspec::Docker
Constructs a Docker Serverspec runner class to run Docker images.
74 75 76 77 |
# File 'lib/dockerspec/runner/serverspec/docker.rb', line 74 def initialize(*opts) super calculate_docker_backend_name('docker') end |
Instance Method Details
#container ⇒ Docker::Container
Gets the internal Docker::Container object.
86 87 88 89 90 91 |
# File 'lib/dockerspec/runner/serverspec/docker.rb', line 86 def container @cached_container ||= begin backend = Engine::Specinfra::Backend.new(backend_name) backend.backend_instance_attribute(:container) end end |