kolla-ansible/docker/ironic/ironic-base/Dockerfile.j2
Michal Rostecki febcb600f1 Source installation in virtualenv
Use virtualenv for installation of OpenStack projects and
dependencies to avoid conflicts with Python libraries installed
by non-OpenStack binary packages.

Change-Id: I21ecd673b2e93335b1d3dd4e279e940c9d694c3c
Implements: blueprint virtualenv
2015-11-27 10:22:17 +01:00

31 lines
1.0 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
# TODO(SamYaple): until packaging is fixed, all of this is required
# http://pkgs.fedoraproject.org/cgit/openstack-ironic.git/tree/openstack-ironic.spec#n78
RUN yum -y install \
openstack-ironic-common \
python-oslo-log \
python-oslo-concurrency \
python-oslo-policy \
python-oslo-versionedobjects \
&& yum clean all
{% 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 -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
{% endif %}
RUN usermod -a -G kolla ironic