diff --git a/docker/murano/murano-api/Dockerfile.j2 b/docker/murano/murano-api/Dockerfile.j2 index c8827cfda3..9d2890597f 100644 --- a/docker/murano/murano-api/Dockerfile.j2 +++ b/docker/murano/murano-api/Dockerfile.j2 @@ -1,25 +1,23 @@ FROM {{ namespace }}/{{ image_prefix }}murano-base:{{ tag }} MAINTAINER {{ maintainer }} +{% import "macros.j2" as macros with context %} {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install \ - openstack-murano-api \ - && yum clean all - + {% set murano_api_packages = ['openstack-murano-api'] %} {% elif base_distro in ['ubuntu'] %} - -RUN apt-get -y install --no-install-recommends \ - murano-api \ - && apt-get clean - + {% set murano_api_packages = ['murano-api'] %} {% endif %} + +RUN {{ macros.install_packages(murano_api_packages | customizable("packages")) }} + {% endif %} COPY extend_start.sh /usr/local/bin/kolla_murano_extend_start RUN chmod 755 /usr/local/bin/kolla_murano_extend_start +{% block murano_api_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }} USER murano diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 index 98b6dbbd0b..b9fe141d1b 100644 --- a/docker/murano/murano-base/Dockerfile.j2 +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -1,20 +1,18 @@ FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} MAINTAINER {{ maintainer }} +{% import "macros.j2" as macros with context %} + {% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install \ - openstack-murano-common \ - && yum clean all - + {% set murano_base_packages = ['openstack-murano-common'] %} {% elif base_distro in ['ubuntu'] %} - -RUN apt-get -y install --no-install-recommends \ - murano-common \ - && apt-get clean - + {% set murano_base_packages = ['murano-common'] %} {% endif %} + +RUN {{ macros.install_packages(murano_base_packages | customizable("packages")) }} + {% elif install_type == 'source' %} ADD murano-base-archive /murano-base-source @@ -32,3 +30,6 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN usermod -a -G kolla murano \ && touch /usr/local/bin/kolla_murano_extend_start \ && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_murano_extend_start + +{% block murano_base_footer %}{% endblock %} +{% block footer %}{% endblock %} diff --git a/docker/murano/murano-engine/Dockerfile.j2 b/docker/murano/murano-engine/Dockerfile.j2 index b7df4ce61f..9a2395ad59 100644 --- a/docker/murano/murano-engine/Dockerfile.j2 +++ b/docker/murano/murano-engine/Dockerfile.j2 @@ -1,22 +1,21 @@ FROM {{ namespace }}/{{ image_prefix }}murano-base:{{ tag }} MAINTAINER {{ maintainer }} +{% import "macros.j2" as macros with context %} + {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install \ - openstack-murano-engine \ - && yum clean all - + {% set murano_engine_packages = ['openstack-murano-engine'] %} {% elif base_distro in ['ubuntu'] %} - -RUN apt-get -y install --no-install-recommends \ - murano-engine \ - && apt-get clean - + {% set murano_engine_packages = ['murano-engine'] %} {% endif %} + +RUN {{ macros.install_packages(murano_engine_packages | customizable("packages")) }} + {% endif %} +{% block murano_engine_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }} USER murano