kolla/docker/panko/panko-base/Dockerfile.j2
Jeffrey Zhang 68826b64e2 implement panko api for ubuntu binary
Change-Id: I34ea4097be491c70e5fa183ee7d505885d7d7c3c
2017-07-18 08:37:18 +00:00

78 lines
2.4 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block panko_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='panko') }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set panko_base_packages = [
'httpd',
'mod_ssl',
'mod_wsgi',
'openstack-panko-common',
'python-ldappool'
] %}
{{ macros.install_packages(panko_base_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set panko_base_packages = [
'apache2',
'libapache2-mod-wsgi'
] %}
{{ macros.install_packages(panko_base_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set panko_base_packages = [
'httpd',
'mod_ssl',
'mod_wsgi',
'python-ldappool'
] %}
{{ macros.install_packages(panko_base_packages | customizable("packages")) }}
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set panko_base_packages = [
'apache2',
'libapache2-mod-wsgi',
'python-ldappool'
] %}
{{ macros.install_packages(panko_base_packages | customizable("packages")) }}
RUN truncate -s 0 /etc/apache2/ports.conf
{% endif %}
ADD panko-base-archive /panko-base-source
{% set panko_base_pip_packages = [
'/panko',
'pymongo'
] %}
RUN ln -s panko-base-source/* panko \
&& {{ macros.install_pip(panko_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/panko \
&& cp -r /panko/etc/panko/* /etc/panko/ \
&& chown -R panko: /etc/panko
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN touch /usr/local/bin/kolla_panko_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_panko_extend_start
{% block panko_base_footer %}{% endblock %}