Class: Serverspec::Type::DockerContainer
- Inherits:
-
DockerBase
- Object
- Base
- DockerBase
- Serverspec::Type::DockerContainer
- Defined in:
- lib/serverspec/type/docker_container.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from DockerBase
Methods inherited from Base
#initialize, #inspect, #to_ary, #to_s
Constructor Details
This class inherits a constructor from Serverspec::Type::Base
Instance Method Details
#has_volume?(container_path, host_path) ⇒ Boolean
7 8 9 10 11 12 13 |
# File 'lib/serverspec/type/docker_container.rb', line 7 def has_volume?(container_path, host_path) if (inspection['Mounts']) check_volume(container_path, host_path) else check_volume_pre_1_8(container_path, host_path) end end |
#running? ⇒ Boolean
3 4 5 |
# File 'lib/serverspec/type/docker_container.rb', line 3 def running? inspection['State']['Running'] && !inspection['State']['Restarting'] end |