2015-09-17 09:35:33 -07:00
|
|
|
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
2015-11-23 12:38:58 +05:30
|
|
|
MAINTAINER {{ maintainer }}
|
2015-08-19 15:59:06 -04:00
|
|
|
|
|
|
|
{% if install_type == 'binary' %}
|
2015-09-04 02:15:03 -07:00
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
2015-08-19 15:59:06 -04:00
|
|
|
|
|
|
|
RUN yum -y install \
|
2015-11-24 21:27:38 +05:30
|
|
|
openstack-ironic-common \
|
2015-08-19 15:59:06 -04:00
|
|
|
&& yum clean all
|
|
|
|
|
2016-01-14 18:34:12 +02:00
|
|
|
{% elif base_distro in ['ubuntu'] %}
|
|
|
|
|
|
|
|
RUN apt-get install -y --no-install-recommends \
|
|
|
|
ironic-common \
|
|
|
|
&& apt-get clean
|
|
|
|
|
2015-08-19 15:59:06 -04:00
|
|
|
{% endif %}
|
|
|
|
{% elif install_type == 'source' %}
|
|
|
|
|
2015-09-02 17:36:46 +03:00
|
|
|
ADD ironic-base-archive /ironic-base-source
|
|
|
|
RUN ln -s ironic-base-source/* ironic \
|
2015-08-23 11:50:50 +00:00
|
|
|
&& useradd --user-group ironic \
|
2015-12-27 02:41:30 +00:00
|
|
|
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ironic \
|
2015-08-23 11:50:50 +00:00
|
|
|
&& mkdir -p /etc/ironic /var/log/ironic /home/ironic \
|
2015-11-20 21:34:22 +02:00
|
|
|
&& cp -r /ironic/etc/ironic/* /etc/ironic/ \
|
2016-02-03 05:12:13 +00:00
|
|
|
&& chown -R ironic: /etc/ironic /var/log/ironic /home/ironic \
|
|
|
|
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/ironic/rootwrap.conf
|
2015-08-19 15:59:06 -04:00
|
|
|
|
|
|
|
{% endif %}
|
2015-11-24 20:52:01 +05:30
|
|
|
|
|
|
|
RUN usermod -a -G kolla ironic
|