Class: Packer::PostProcessor::DockerTag

Inherits:
Packer::PostProcessor show all
Defined in:
lib/packer/postprocessors/docker.rb

Constant Summary

Constants inherited from Packer::PostProcessor

DOCKER_IMPORT, DOCKER_PUSH, DOCKER_SAVE, DOCKER_TAG, VAGRANT, VALID_POST_PROCESSOR_TYPES

Instance Attribute Summary

Attributes inherited from DataObject

#data, #key_dependencies, #required

Instance Method Summary collapse

Methods inherited from Packer::PostProcessor

#except, get_postprocessor, #keep_input_artifact, #only, types

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

#initializeDockerTag

Returns a new instance of DockerTag.



63
64
65
66
67
# File 'lib/packer/postprocessors/docker.rb', line 63

def initialize
  super
  self.data['type'] = DOCKER_TAG
  self.add_required('repository')
end

Instance Method Details

#repository(repo) ⇒ Object



69
70
71
# File 'lib/packer/postprocessors/docker.rb', line 69

def repository(repo)
  self.__add_string('repository', repo)
end

#tag(tag) ⇒ Object



73
74
75
# File 'lib/packer/postprocessors/docker.rb', line 73

def tag(tag)
  self.__add_string('tag', tag)
end