Class: Racker::Builders::Docker

Inherits:
Builder
  • Object
show all
Defined in:
lib/racker/builders/docker.rb

Overview

This is the Docker builder

Instance Method Summary collapse

Methods inherited from Builder

#convert_hash_to_packer_value

Instance Method Details

#to_packer(name, config) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/racker/builders/docker.rb', line 8

def to_packer(name, config)
  log = Log4r::Logger['racker']
  log.debug("Entering #{self.class}.#{__method__}")
  config = super(name, config)

  %w(run_command).each do |key|
    if config.key? key
      log.info("Converting #{key} to packer value...")
      config[key] = convert_hash_to_packer_value(config[key])
    end
  end

  log.debug("Leaving #{self.class}.#{__method__}")
  config
end