kolla-ansible/docker/tgtd/Dockerfile.j2
Serguei Bezverkhi 184f01a0d6 Adds iscsid and tgtd docker containers
This partially implements iscsi and lvm2 support for cinder
in Kolla. Adds iscsid and tgtd docker containers.

Change-Id: I7fb48c954e578772b90a2aa619c8bcfa990b3ae8
Partially-Implements: blueprint iscsi-lvm2-docker
2016-04-10 09:17:16 -04:00

23 lines
535 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum install -y \
scsi-target-utils \
&& yum clean all
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
tgt \
&& apt-get clean
RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf
{% endif %}
{{ include_footer }}