From d98a102162ff76b09771585ec21ca23415335b90 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Wed, 6 Dec 2017 12:20:26 +0800 Subject: Support squash docker images layers Implements: blueprint squash-layers Change-Id: Ic9a144e50440ccb37f7781d8955815a64282e687 --- kolla/common/config.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'kolla/common/config.py') diff --git a/kolla/common/config.py b/kolla/common/config.py index f7e3d1be3..f2e57eef0 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -258,6 +258,10 @@ _CLI_OPTS = [ help='Attempt to pull a newer version of the base image'), cfg.StrOpt('work-dir', help=('Path to be used as working directory.' ' By default, a temporary dir is created')), + cfg.BoolOpt('squash', default=False, + help=('Squash the image layers. WARNING: it will consume lots' + ' of disk IO. "docker-squash" tool is required, install' + ' it by "pip install docker-squash"')), ] _BASE_OPTS = [ @@ -269,7 +273,11 @@ _BASE_OPTS = [ help=('Comma separated list of .rpm or .repo file(s) ' 'or URL(s) to install before building containers')), cfg.StrOpt('apt_sources_list', help=('Path to custom sources.list')), - cfg.StrOpt('apt_preferences', help=('Path to custom apt/preferences')) + cfg.StrOpt('apt_preferences', help=('Path to custom apt/preferences')), + cfg.BoolOpt('squash-cleanup', default=True, + help='Remove source image from Docker after squashing'), + cfg.StrOpt('squash-tmp-dir', + help='Temporary directory to be used during squashing') ] -- cgit v1.2.3