Class: DockerTools::Run
- Inherits:
-
Object
- Object
- DockerTools::Run
- Defined in:
- lib/docker_tools/run.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
Returns the value of attribute container.
Instance Method Summary collapse
-
#initialize(name, registry, tag, image = nil, command = nil, volumes = []) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(name, registry, tag, image = nil, command = nil, volumes = []) ⇒ Run
Returns a new instance of Run.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/docker_tools/run.rb', line 7 def initialize(name, registry, tag, image = nil, command = nil, volumes = []) @name = name @registry = registry @tag = tag @command = command @volumes = volumes @image = "#{@registry}/#{@name}:#{@tag}" if image.nil? @image = image unless image.nil? @container = create_container(@image, @command, @volumes) end |
Instance Attribute Details
#container ⇒ Object
Returns the value of attribute container.
5 6 7 |
# File 'lib/docker_tools/run.rb', line 5 def container @container end |