diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 9c921373fa..22457700c0 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM {{ base_distro }}:{{ base_distro_tag }} MAINTAINER {{ maintainer }} +LABEL kolla_version="{{ kolla_version }}" + {# Early failure for bases and types #} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} {% if install_type not in ['source', 'binary', 'rdo', 'rhel'] %} diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index 6ad393c8b5..b22f0ba81d 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -434,7 +434,8 @@ class KollaWorker(object): 'install_type': self.install_type, 'namespace': self.namespace, 'tag': self.tag, - 'maintainer': self.maintainer} + 'maintainer': self.maintainer, + 'kolla_version': get_kolla_version()} if self.include_header: with open(self.include_header, 'r') as f: values['include_header'] = f.read()