kolla/docker/ironic/ironic-base/Dockerfile.j2
SamYaple 2514bcf0c3 Correct issue with virtualenv rootwrap
Because we use rootwrap in a venv we need to update the exec_dirs.
Without doing this *some* commands will break for various reasons that
I won't get into in this review in detail. But this is required for
neutron-l3-agent in a container + drop-root.

Change-Id: I1a09f7188fdd501b7ce251d9f2fb0e5b10222142
Partially-Implements: blueprint drop-root
2016-02-06 06:48:59 +00:00

32 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ironic-common \
&& yum clean all
{% elif base_distro in ['ubuntu'] %}
RUN apt-get install -y --no-install-recommends \
ironic-common \
&& apt-get clean
{% endif %}
{% elif install_type == 'source' %}
ADD ironic-base-archive /ironic-base-source
RUN ln -s ironic-base-source/* ironic \
&& useradd --user-group ironic \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ironic \
&& mkdir -p /etc/ironic /var/log/ironic /home/ironic \
&& cp -r /ironic/etc/ironic/* /etc/ironic/ \
&& 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
{% endif %}
RUN usermod -a -G kolla ironic