Fix fix-layer launching and env var population

This commit is contained in:
Disassembler 2019-10-03 12:13:39 +02:00
parent 77196fdcca
commit dfdd1de8e8
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -96,7 +96,7 @@ class Builder:
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']]
subprocess.run([cmd] + layers, check=True) subprocess.run(cmd + layers, check=True)
def copy_files(self, src, dst): def copy_files(self, src, dst):
dst = os.path.join(self.image.path, dst) dst = os.path.join(self.image.path, dst)
@ -109,7 +109,7 @@ class Builder:
def add_env(self, key, value): def add_env(self, key, value):
if 'env' not in self.image.conf: if 'env' not in self.image.conf:
self.image.conf['env'] = [] self.image.conf['env'] = []
self.image.conf['env'].append('{}={}'.format(key, value)) self.image.conf['env'].append([key, value])
def set_user(self, uid, gid): def set_user(self, uid, gid):
self.image.conf['uid'] = uid self.image.conf['uid'] = uid