Class: Packer::Builder::Docker

Inherits:
Packer::Builder show all
Defined in:
lib/packer/builders/docker.rb

Constant Summary

Constants inherited from Packer::Builder

AMAZON_EBS, AMAZON_INSTANCE, DOCKER, NULL, QEMU, VALID_BUILDER_TYPES, VIRTUALBOX_ISO, VMWARE_ISO, VMWARE_VMX

Instance Attribute Summary

Attributes inherited from Packer::Builder

#communicators

Attributes inherited from DataObject

#data, #key_dependencies, #required

Instance Method Summary collapse

Methods inherited from Packer::Builder

#communicator, get_builder, #name, #ssh_bastion_host, #ssh_bastion_password, #ssh_bastion_private_key_file, #ssh_bastion_username, #ssh_disable_agent, #ssh_handshake_attempts, #ssh_host, #ssh_password, #ssh_port, #ssh_private_key_file, #ssh_pty, #ssh_timeout, #ssh_username, types, #winrm_host, #winrm_password, #winrm_port, #winrm_timeout, #winrm_username

Methods inherited from DataObject

#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_ints, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_json, #__add_string, #__exclusive_key_error, #add_key_dependencies, #add_required, #deep_copy, #validate, #validate_key_dependencies, #validate_required

Constructor Details

#initializeDocker

Returns a new instance of Docker.



8
9
10
11
12
13
14
15
# File 'lib/packer/builders/docker.rb', line 8

def initialize
  super
  self.data['type'] = DOCKER
  self.add_required(
    'export_path',
    'image'
  )
end

Instance Method Details

#export_path(path) ⇒ Object



17
18
19
# File 'lib/packer/builders/docker.rb', line 17

def export_path(path)
  self.__add_string('export_path', path)
end

#image(name) ⇒ Object



21
22
23
# File 'lib/packer/builders/docker.rb', line 21

def image(name)
  self.__add_string('image', name)
end

#pull(bool) ⇒ Object



25
26
27
# File 'lib/packer/builders/docker.rb', line 25

def pull(bool)
  self.__add_boolean('pull', bool)
end

#run_command(commands) ⇒ Object



29
30
31
# File 'lib/packer/builders/docker.rb', line 29

def run_command(commands)
  self.__add_array_of_strings('run_command', commands)
end