From 9d1e3f2d60368edd909615e90fb5505ca5c29a57 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 24 Sep 2019 19:15:22 +0200 Subject: [PATCH] Fix layers, destroy container on build cleanup --- apk/vmmgr | 2 +- build/usr/lib/python3.6/lxcbuild/builder.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apk/vmmgr b/apk/vmmgr index 171aa76..7591cf2 160000 --- a/apk/vmmgr +++ b/apk/vmmgr @@ -1 +1 @@ -Subproject commit 171aa760438326240ece7f034ad5b39a89a4fa74 +Subproject commit 7591cf2d477c9d97c96e13ee276da0bc0cf2a47e diff --git a/build/usr/lib/python3.6/lxcbuild/builder.py b/build/usr/lib/python3.6/lxcbuild/builder.py index 8072907..4a64a76 100644 --- a/build/usr/lib/python3.6/lxcbuild/builder.py +++ b/build/usr/lib/python3.6/lxcbuild/builder.py @@ -92,7 +92,7 @@ class Builder: layer_path = self.get_layer_path(name) if not os.path.exists(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): layers = [self.get_layer_path(layer) for layer in self.image.conf['layers']] @@ -129,6 +129,7 @@ class Builder: def clean(self): shutil.rmtree(self.image.path) + lxcmgr.destroy_container(self.image.name) def unpack_http_archive(src, dst): xf = 'xzf'