diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index e386873616..de5f4d8e8b 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -149,6 +149,19 @@ The ``kolla-build.conf`` file could look like this: Note that the name of the section should exactly match the image name you are trying to change source location for. +If using the ``local`` source type, the ``--locals-base`` flag can be used to +define a path prefix, which you can reference in the config. + +.. path etc/kolla/kolla-build.conf +.. code-block:: ini + + [DEFAULTS] + locals_base = /home/kolla/src + + [heat-base] + type = local + location = $locals_base/heat + .. _dockerfile-customisation: Dockerfile customisation diff --git a/kolla/common/config.py b/kolla/common/config.py index 58a4e18aa3..dca9e278c9 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -168,6 +168,8 @@ _CLI_OPTS = [ help='Show image dependencies (filtering supported)'), cfg.BoolOpt('list-images', help='Show all available images (filtering supported)'), + cfg.StrOpt('locals-base', default='./', + help='Base directory for local source resolution'), cfg.StrOpt('namespace', short='n', default='kolla', help='The Docker namespace name'), cfg.StrOpt('network_mode', default='host',