Class: Deck::CommandLine::ContainerHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/deck/command_line/container_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options) ⇒ ContainerHelper

Returns a new instance of ContainerHelper.



4
5
6
7
8
# File 'lib/deck/command_line/container_helper.rb', line 4

def initialize(name, options)
  @options = options

  load_blueprint name
end

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



2
3
4
# File 'lib/deck/command_line/container_helper.rb', line 2

def container
  @container
end

Instance Method Details

#build_commandObject



15
16
17
18
# File 'lib/deck/command_line/container_helper.rb', line 15

def build_command
  command = raw_build_command
  process_meta command
end

#run_commandObject



10
11
12
13
# File 'lib/deck/command_line/container_helper.rb', line 10

def run_command
  command = @container.run_command
  process_meta command
end

#update_latest_tagObject



20
21
22
# File 'lib/deck/command_line/container_helper.rb', line 20

def update_latest_tag
  process_meta "docker tag -f #{@container.image_name} #{@container.repository}/#{@container.name}:latest"
end