wip
This commit is contained in:
parent
60202fff83
commit
e3d2c356ba
|
@ -84,10 +84,14 @@ def build_image(conf, update, verbose):
|
|||
print('image: {} up-to-date'.format(image_name))
|
||||
return image_name
|
||||
|
||||
image = conf.get('image')
|
||||
dockerfile = conf.get('dockerfile')
|
||||
pkginstall = conf.get('pkginstall')
|
||||
packages = conf.get('packages')
|
||||
|
||||
if not dockerfile:
|
||||
dockerfile = []
|
||||
if image:
|
||||
dockerfile.insert(0, 'FROM {}'.format(image))
|
||||
if packages:
|
||||
for p in packages:
|
||||
dockerfile.append(pkginstall.format(p))
|
||||
|
@ -108,7 +112,8 @@ def build_image(conf, update, verbose):
|
|||
if not os.path.exists(cache_dir):
|
||||
os.mkdir(cache_dir)
|
||||
with open(cache_file, 'w') as file:
|
||||
print('cache: {}'.format(cache_file))
|
||||
if verbose:
|
||||
print('cache: {}'.format(cache_file))
|
||||
file.write('')
|
||||
|
||||
return image_name
|
||||
|
|
Loading…
Reference in New Issue