Class: DockerTools::Run

Inherits:
Object
  • Object
show all
Defined in:
lib/docker_tools/run.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#containerObject

Returns the value of attribute container.



5
6
7
# File 'lib/docker_tools/run.rb', line 5

def container
  @container
end