Method: DockerImageTask#initialize
- Defined in:
- lib/lux/dockertasks.rb
#initialize(image, name = nil, &block) ⇒ DockerImageTask
The image may include a tag, but the tag is never part of the name If the tag is omitted it defaults to ‘latest’ If a name is specified it becomes the task name.
38 39 40 41 42 43 44 45 |
# File 'lib/lux/dockertasks.rb', line 38 def initialize(image, name=nil, &block) @image, sep, @tag = image.partition(':') @tag = 'latest' if @tag.empty? @name = name || @image @description = "Build Docker Image #{@image}:#{@tag}" @build = block define end |