kolla/docker_templates/ironic/ironic-base/Dockerfile.j2
Sam Yaple e4e4bf07ff Ironic From Source
This adds the source install for the ironic container as well as
allowing Ubuntu to build it.

Change-Id: Id57f9c1ec2efdbbee581be00f3eef71609b919d6
Partially-Implements: blueprint ironic-container
Partially-Implements: blueprint install-from-ubuntu
2015-08-24 13:34:40 +00:00

38 lines
1.1 KiB
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'] %}
# until packaging is fixed, all of this is required
# api: policy
# conductor:MySQL-python
RUN yum -y install \
python-oslo-log \
python-oslo-concurrency \
python-oslo-policy \
MySQL-python \
&& 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 ironic.tar /
RUN ln -s /ironic-* /ironic
RUN cd /ironic \
&& useradd --user-group ironic \
&& pip install -r requirements.txt \
&& pip install --install-option="--install-scripts=/usr/bin" /ironic \
&& mkdir -p /etc/ironic /var/log/ironic /home/ironic \
&& cp -r /ironic/etc/* /etc/ironic/ \
&& chown -R ironic: /etc/ironic /var/log/ironic /home/ironic \
&& rm -rf /root/.cache
{% endif %}