Class: Holodekk::Image::Instructions::From
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
instruction_tag, tag, #tag, #to_json
Instance Attribute Details
#image ⇒ Object
Returns the value of attribute image.
7
8
9
|
# File 'lib/holodekk/image/instructions/from.rb', line 7
def image
@image
end
|
Class Method Details
.build(image) ⇒ Object
11
12
13
|
# File 'lib/holodekk/image/instructions/from.rb', line 11
def self.build(image)
new({ image: image })
end
|
Instance Method Details
#as_json(_options = {}) ⇒ Object
21
22
23
24
25
26
|
# File 'lib/holodekk/image/instructions/from.rb', line 21
def as_json(_options = {})
{
type: 'From',
image: image
}
end
|
#to_dockerfile(_options = {}) ⇒ Object
15
16
17
18
19
|
# File 'lib/holodekk/image/instructions/from.rb', line 15
def to_dockerfile(_options = {})
builder = Docker::Dockerfile::InstructionBuilder.new(self)
builder.raw_value(image)
builder.output
end
|