Class: Docker::Template::Scratch
- Defined in:
- lib/docker/template/scratch.rb
Constant Summary
Constants inherited from Builder
Builder::ALIAS_SETUP, Builder::SETUP
Instance Attribute Summary collapse
-
#rootfs ⇒ Object
readonly
Returns the value of attribute rootfs.
Attributes inherited from Builder
Instance Method Summary collapse
-
#data ⇒ Object
———————————————————————-.
-
#initialize(*args) ⇒ Scratch
constructor
———————————————————————-.
-
#teardown(img: false) ⇒ Object
———————————————————————-.
Methods inherited from Builder
#alias?, #aliased_img, #build, #normal?, #push, #rootfs?, #scratch?
Constructor Details
Instance Attribute Details
#rootfs ⇒ Object (readonly)
Returns the value of attribute rootfs.
10 11 12 |
# File 'lib/docker/template/scratch.rb', line 10 def rootfs @rootfs end |
Instance Method Details
#data ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/docker/template/scratch.rb', line 22 def data Template.get(:scratch, { :entrypoint => @repo..entry, :maintainer => @repo..maintainer, :tar_gz => @tar_gz.basename }) end |
#teardown(img: false) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/docker/template/scratch.rb', line 32 def teardown(img: false) @copy.rm_rf if @copy @context.rm_rf if @context @tar_gz.rm_rf if @tar_gz if @img && img then @img.delete({ "force" => true }) end rescue Docker::Error::NotFoundError nil end |