kolla/docker/masakari/masakari-base/Dockerfile.j2
Radosław Piliszek 1aca9acb2f Build Masakari for Ubuntu binary
Change-Id: I448793566202e672348733b8bbbd6665dc251dfe
2021-01-25 15:31:55 +00:00

69 lines
1.8 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block masakari_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='masakari') }}
{% if install_type == 'binary' %}
{% if base_package_type == 'rpm' %}
{# not available #}
{% set masakari_base_packages = [
] %}
{% elif base_package_type == 'deb' %}
{% set masakari_base_packages = [
'python3-masakari',
] %}
{% endif %}
{{ macros.install_packages(masakari_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_package_type == 'rpm' %}
{% set masakari_base_packages = [
] %}
{% elif base_package_type == 'deb' %}
{% set masakari_base_packages = [
] %}
{% endif %}
{{ macros.install_packages(masakari_base_packages | customizable("packages")) }}
RUN mkdir -p /var/www/cgi-bin/masakari
ADD masakari-base-archive /masakari-base-source
{% set masakari_base_pip_packages = [
'/masakari'
] %}
RUN ln -s masakari-base-source/* masakari \
&& {{ macros.install_pip(masakari_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/masakari /var/www/cgi-bin/masakari \
&& cp -r /masakari/etc/masakari/* /etc/masakari/ \
&& chown -R masakari: /etc/masakari /var/www/cgi-bin/masakari \
&& chmod 755 /var/www/cgi-bin/masakari
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN touch /usr/local/bin/kolla_masakari_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_masakari_extend_start
{% block masakari_base_footer %}{% endblock %}