kolla-ansible/docker/designate/designate-base/Dockerfile.j2
SamYaple cda0459ad1 Fix pip install settings
There were some inconsistencies with pip install instructions
thoughout Kolla. We fix those here.

Additionally, we fix the virtualenv to properly use the site-packages
on the host if a library is not available in the venv.

Change-Id: Ib84d48e8826bb96060338b3fa0782620c98794a8
Related-Bug: #1524684
Closes-Bug: #1529434
2015-12-27 03:35:35 +00:00

34 lines
1.3 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
# Install designate-api because of /etc/designate/policy.json, which
# is needed in all services. This is probably a packaging bug. We do
# need the complete policy file because of some of the containers'
# requiring it. Remove the package when the file is moved though.
RUN yum install -y \
openstack-designate-api \
openstack-designate-common \
python-tooz \
&& yum clean all \
&& cp /etc/designate/policy.json /tmp/ \
&& rpm -e openstack-designate-api \
&& mv /tmp/policy.json /etc/designate/
{% endif %}
{% elif install_type == 'source' %}
ADD designate-base-archive /designate-base-source
RUN ln -s designate-base-source/* designate \
&& useradd --user-group designate \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /designate \
&& mkdir -p /etc/designate /var/log/designate /home/designate \
&& cp -r /designate/etc/designate/* /etc/designate/ \
&& chown -R designate: /etc/designate /var/log/designate /home/designate
{% endif %}
RUN usermod -a -G kolla designate