Class: Docker::Template::Simple
Constant Summary
Constants inherited
from Common
Common::CopyMethods
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Common
#aliased?, #build, #chdir_build, #parent_img, #parent_repo, #push, #rootfs?
Constructor Details
#initialize(repo) ⇒ Simple
9
10
11
|
# File 'lib/docker/template/simple.rb', line 9
def initialize(repo)
@repo = repo
end
|
Instance Attribute Details
Returns the value of attribute repo.
8
9
10
|
# File 'lib/docker/template/simple.rb', line 8
def repo
@repo
end
|
Instance Method Details
#setup_context ⇒ Object
30
31
32
33
34
35
|
# File 'lib/docker/template/simple.rb', line 30
def setup_context
@context = @repo.tmpdir
@copy = @context.join("copy")
copy_dockerfile
@copy.mkdir
end
|
15
16
17
18
|
# File 'lib/docker/template/simple.rb', line 15
def sync
copy_build_and_verify unless @context
Util.create_dockerhub_context(self, @context)
end
|
#unlink(img: false, sync: true) ⇒ Object
22
23
24
25
26
|
# File 'lib/docker/template/simple.rb', line 22
def unlink(img: false, sync: true)
@img.delete "force" => true if @img && img
@context.rmtree if @context && @context.directory?
self.sync if sync && @repo.syncable?
end
|