From e418a04e35e8169f5d9e933cdbcd964de529e8f6 Mon Sep 17 00:00:00 2001 From: Rohit Agarwalla Date: Thu, 4 Aug 2016 10:36:11 -0700 Subject: [PATCH] Customizations for iscsid This patchset contains customization of Dockerfile of iscsid container Change-Id: Ibca1b944d3eacf03c945eb808f43326c3ef20c97 Partially-implements: blueprint third-party-plugin-support --- docker/iscsid/Dockerfile.j2 | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/docker/iscsid/Dockerfile.j2 b/docker/iscsid/Dockerfile.j2 index 7c38ad79c8..3caf0b94eb 100644 --- a/docker/iscsid/Dockerfile.j2 +++ b/docker/iscsid/Dockerfile.j2 @@ -1,22 +1,26 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} MAINTAINER {{ maintainer }} -{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} +{% import "macros.j2" as macros with context %} -RUN yum -y install \ - iscsi-initiator-utils \ - targetcli \ - python-rtslib \ - && yum clean all +{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + {% set iscsid_packages = [ + 'iscsi-initiator-utils', + 'targetcli', + 'python-rtslib' + ] %} {% elif base_distro in ['ubuntu', 'debian'] %} - -RUN apt-get -y install --no-install-recommends \ - open-iscsi \ - targetcli \ - python-rtslib \ - && apt-get clean + {% set iscsid_packages = [ + 'open-iscsi', + 'targetcli', + 'python-rtslib' + ] %} {% endif %} +RUN {{ macros.install_packages(iscsid_packages | customizable("packages")) }} + +{% block iscsid_footer %}{% endblock %} +{% block footer %}{% endblock %} {{ include_footer }}