Support a custom base image
Add a new option(base-image) to support custom base image In default, the base-image is equal to base. When using custom image, please use command line like: ./tool/build.py --base-image my-image --base centos --base-tag 0.1 DocImpact Closes-Bug: #1573544 Change-Id: If4b9c57a2b68f6f06d3e981f30b2173064e02193
This commit is contained in:
parent
fcdf187337
commit
070bf25835
@ -1,4 +1,4 @@
|
||||
FROM {{ base_distro }}:{{ base_distro_tag }}
|
||||
FROM {{ base_image }}:{{ base_distro_tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
LABEL kolla_version="{{ kolla_version }}"
|
||||
|
@ -479,6 +479,7 @@ class KollaWorker(object):
|
||||
loader=jinja2.FileSystemLoader(path))
|
||||
template = env.get_template(template_name)
|
||||
values = {'base_distro': self.base,
|
||||
'base_image': self.conf.base_image,
|
||||
'base_distro_tag': self.base_tag,
|
||||
'install_metatype': self.install_metatype,
|
||||
'image_prefix': self.image_prefix,
|
||||
|
@ -56,10 +56,12 @@ _CLI_OPTS = [
|
||||
cfg.StrOpt('base', short='b', default='centos',
|
||||
choices=BASE_OS_DISTRO,
|
||||
deprecated_group='kolla-build',
|
||||
help='The base distro to use when building'),
|
||||
help='The distro type of the base image'),
|
||||
cfg.StrOpt('base-tag', default='latest',
|
||||
deprecated_group='kolla-build',
|
||||
help='The base distro image tag'),
|
||||
cfg.StrOpt('base-image', default=None,
|
||||
help='The base image name. Default is the same with base'),
|
||||
cfg.BoolOpt('debug', short='d', default=False,
|
||||
deprecated_group='kolla-build',
|
||||
help='Turn on debugging log level'),
|
||||
@ -288,3 +290,5 @@ def parse(conf, args, usage=None, prog=None,
|
||||
prog=prog,
|
||||
version=version.cached_version_string(),
|
||||
default_config_files=default_config_files)
|
||||
if not conf.base_image:
|
||||
conf.base_image = conf.base
|
||||
|
Loading…
Reference in New Issue
Block a user