IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
瀏覽代碼

Added --squeeze switch to focker compose build.

master
父節點
當前提交
edca7c0913
共有 2 個檔案被更改,包括 8 行新增4 行删除
  1. +7
    -4
      focker/compose.py
  2. +1
    -0
      focker/focker.py

+ 7
- 4
focker/compose.py 查看文件

@@ -48,11 +48,14 @@ def build_volumes(spec):
zfs_set_props(name, params['zfs'])
def build_images(spec, path):
def build_images(spec, path, args):
# print('build_images(): NotImplementedError')
for (tag, focker_dir) in spec.items():
res = subprocess.run(['focker', 'image', 'build',
os.path.join(path, focker_dir), '-t', tag])
cmd = ['focker', 'image', 'build',
os.path.join(path, focker_dir), '-t', tag]
if args.squeeze:
cmd.append('--squeeze')
res = subprocess.run(cmd)
if res.returncode != 0:
raise RuntimeError('Image build failed: ' + str(res.returncode))
@@ -97,7 +100,7 @@ def command_compose_build(args):
if 'volumes' in spec:
build_volumes(spec['volumes'])
if 'images' in spec:
build_images(spec['images'], path)
build_images(spec['images'], path, args)
if 'jails' in spec:
build_jails(spec['jails'])


+ 1
- 0
focker/focker.py 查看文件

@@ -192,6 +192,7 @@ def create_parser():
parser = ListForwarder([subparsers.add_parser(cmd) for cmd in ['build', 'bld', 'b']])
parser.set_defaults(func=command_compose_build)
parser.add_argument('filename', type=str)
parser.add_argument('--squeeze', '-s', action='store_true')
parser = ListForwarder([subparsers.add_parser(cmd) for cmd in ['run', 'r']])
parser.set_defaults(func=command_compose_run)


Loading…
取消
儲存