diff --git a/docker/ceph/ceph-base/Dockerfile.j2 b/docker/ceph/ceph-base/Dockerfile.j2 index 45ba62b9b8..ce354587ca 100644 --- a/docker/ceph/ceph-base/Dockerfile.j2 +++ b/docker/ceph/ceph-base/Dockerfile.j2 @@ -1,27 +1,25 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} MAINTAINER {{ maintainer }} +{% import "macros.j2" as macros with context %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} - -RUN yum -y install \ - ceph \ - ceph-radosgw \ - parted \ - hdparm \ - btrfs-progs \ - && yum clean all - + {% set ceph_base_packages = [ + 'ceph', + 'ceph-radosgw', + 'parted', + 'hdparm', + 'btrfs-progs' + ] %} {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get -y install --no-install-recommends \ - ceph \ - radosgw \ - parted \ - hdparm \ - btrfs-tools \ - && apt-get clean - + {% set ceph_base_packages = [ + 'ceph', + 'radosgw', + 'parted', + 'hdparm', + 'btrfs-tools' + ] %} {% endif %} +RUN {{ macros.install_packages(ceph_base_packages | customizable("packages")) }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start @@ -29,3 +27,7 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start RUN useradd --user-group ceph \ && mkdir -p /home/ceph \ && chown -R ceph: /home/ceph + +{% block ceph_base_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} diff --git a/docker/ceph/ceph-mon/Dockerfile.j2 b/docker/ceph/ceph-mon/Dockerfile.j2 index 38c8d26f6f..f0c084f6b4 100644 --- a/docker/ceph/ceph-mon/Dockerfile.j2 +++ b/docker/ceph/ceph-mon/Dockerfile.j2 @@ -6,4 +6,6 @@ COPY fetch_ceph_keys.py /usr/bin/ COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/bin/fetch_ceph_keys.py +{% block ceph_mon_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }} diff --git a/docker/ceph/ceph-osd/Dockerfile.j2 b/docker/ceph/ceph-osd/Dockerfile.j2 index 03e4dceda5..41c0b6d204 100644 --- a/docker/ceph/ceph-osd/Dockerfile.j2 +++ b/docker/ceph/ceph-osd/Dockerfile.j2 @@ -4,4 +4,6 @@ MAINTAINER {{ maintainer }} COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start +{% block ceph_osd_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }} diff --git a/docker/ceph/ceph-rgw/Dockerfile.j2 b/docker/ceph/ceph-rgw/Dockerfile.j2 index cf60009064..ccdbdebf79 100644 --- a/docker/ceph/ceph-rgw/Dockerfile.j2 +++ b/docker/ceph/ceph-rgw/Dockerfile.j2 @@ -1,4 +1,6 @@ FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} MAINTAINER {{ maintainer }} +{% block ceph_rgw_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }}