kolla/docker/keystone/keystone-base/Dockerfile.j2
Rafal Lewandowski 2050aa35db keystone: Fix for missing libldap-common package for debian
Closes-Bug: #2009484
Change-Id: I01578289e65010748bfaf6d6b81861764aa62368
2023-03-29 11:44:58 +02:00

49 lines
1.5 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block keystone_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='keystone') }}
{% if base_package_type == 'rpm' %}
{% set keystone_base_packages = [
'cyrus-sasl-devel',
'mod_auth_mellon',
'mod_auth_openidc',
'openldap-devel',
] %}
{% elif base_package_type == 'deb' %}
{% set keystone_base_packages = [
'libapache2-mod-auth-mellon',
'libapache2-mod-auth-openidc',
'libldap-common',
'libldap2-dev',
'libsasl2-dev',
] %}
{% endif %}
{{ macros.install_packages(keystone_base_packages | customizable("packages")) }}
{% block keystone_source_install %}
ADD keystone-base-archive /keystone-base-source
{% set keystone_base_pip_packages = [
'/keystone[ldap]',
] %}
RUN ln -s keystone-base-source/* keystone \
&& {{ macros.install_pip(keystone_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/keystone /var/www/cgi-bin/keystone \
&& cp -r /keystone/etc/* /etc/keystone/ \
&& cp /var/lib/kolla/venv/bin/keystone-wsgi-admin /var/www/cgi-bin/keystone/admin \
&& cp /var/lib/kolla/venv/bin/keystone-wsgi-public /var/www/cgi-bin/keystone/main
{% endblock %}
RUN chmod 755 /var/www/cgi-bin/keystone/*
{% block keystone_base_footer %}{% endblock %}