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
# File 'lib/packer/builders/docker.rb', line 8

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

Instance Method Details

#changes(changes) ⇒ Object



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

def changes(changes)
  self.__add_array_of_strings('changes', changes)
end

#commit(bool) ⇒ Object



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

def commit(bool)
  self.__add_boolean('commit', bool, ['export_path'])
end

#export_path(path) ⇒ Object



14
15
16
# File 'lib/packer/builders/docker.rb', line 14

def export_path(path)
  self.__add_string('export_path', path, ['commit'])
end

#image(name) ⇒ Object



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

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

#pull(bool) ⇒ Object



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

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

#run_command(commands) ⇒ Object



34
35
36
# File 'lib/packer/builders/docker.rb', line 34

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