Fix layers, destroy container on build cleanup

This commit is contained in:
Disassembler 2019-09-24 19:15:22 +02:00
parent f9cc283477
commit 9d1e3f2d60
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
2 changed files with 3 additions and 2 deletions

@ -1 +1 @@
Subproject commit 171aa760438326240ece7f034ad5b39a89a4fa74 Subproject commit 7591cf2d477c9d97c96e13ee276da0bc0cf2a47e

View File

@ -92,7 +92,7 @@ class Builder:
layer_path = self.get_layer_path(name) layer_path = self.get_layer_path(name)
if not os.path.exists(layer_path): if not os.path.exists(layer_path):
raise ImageNotFoundError(layer_path) raise ImageNotFoundError(layer_path)
self.image.conf['layers'].insert(-1, name) self.image.conf['layers'].insert(1, name)
def fix_layer(self, cmd): def fix_layer(self, cmd):
layers = [self.get_layer_path(layer) for layer in self.image.conf['layers']] layers = [self.get_layer_path(layer) for layer in self.image.conf['layers']]
@ -129,6 +129,7 @@ class Builder:
def clean(self): def clean(self):
shutil.rmtree(self.image.path) shutil.rmtree(self.image.path)
lxcmgr.destroy_container(self.image.name)
def unpack_http_archive(src, dst): def unpack_http_archive(src, dst):
xf = 'xzf' xf = 'xzf'