kolla-ansible/docker_templates/cinder/cinder-base/Dockerfile.j2
Steven Dake a765e6a708 Make cinder build from source
Either the reference wasn't copied properly, or it changed recently
with Ryan's work.

Change-Id: I2b55affe35104c6baab8804e5452fc7a49bae170
Partially-Implements: blueprint gate-source-builds
2015-08-17 10:06:08 -07:00

32 lines
856 B
Django/Jinja

FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN yum -y install openstack-cinder \
automaton \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% elif install_type == 'source' %}
ADD ./cinder.tar /
RUN ln -s /cinder-* /cinder
RUN cd /cinder \
&& useradd --user-group cinder \
&& pip install -r requirements.txt \
&& pip install /cinder \
&& mkdir /etc/cinder /var/log/cinder \
&& cp -r /cinder/etc/cinder/* /etc/cinder/ \
&& chown -R cinder: /etc/cinder /var/log/cinder \
&& rm -rf /root/.cache
{% endif %}