kolla-ansible/docker/keystone/Dockerfile.j2
Paul Bourke be8a366184 Use openstack/requirements for keystone
See Iccb4e99f8e4b6659a19c1817d0f4c697824af25c for context.

Change-Id: Ic4f5732e70b0cda3b3755e8fe33ece3116fa8afc
Partial-Bug: #150530
2015-10-15 11:08:49 +00:00

57 lines
1.9 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install openstack-keystone \
python-keystoneclient \
httpd \
mod_wsgi \
&& yum clean all
RUN mkdir -p /var/www/cgi-bin/keystone \
&& cp -a /usr/share/keystone/keystone.wsgi /var/www/cgi-bin/keystone/main \
&& cp -a /usr/share/keystone/keystone.wsgi /var/www/cgi-bin/keystone/admin \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
httpd \
mod_wsgi \
&& yum clean all \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
apache2 \
libapache2-mod-wsgi \
&& echo > /etc/apache2/ports.conf \
&& apt-get clean
{% endif %}
ADD keystone-archive /keystone-source
RUN ln -s keystone-source/* keystone \
&& useradd --user-group keystone \
&& pip --no-cache-dir install -c requirements/upper-constraints.txt /keystone \
&& mkdir -p /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone \
&& cp -r /keystone/etc/* /etc/keystone/ \
&& cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/admin \
&& cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/main \
&& chown -R keystone: /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone
{% endif %}
RUN chown -R keystone: /var/www/cgi-bin/keystone \
&& chmod 755 /var/www/cgi-bin/keystone/*
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{{ include_footer }}