kolla/docker/masakari/masakari-monitors/Dockerfile.j2
Michal Nasiadka 66e27b3b0a Remove calls to libvirt repo
It does not exist in repos.yaml since [1].

[1]: Id585c7744ba130ad1dfc28138fb0f9e6eeae771d

Change-Id: Ic74eba44fc6e5508976de24cf20a5039f3292731
2024-02-26 13:04:19 +01:00

54 lines
1.4 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}masakari-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block masakari_monitors_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.enable_extra_repos(['hacluster']) }}
{% if base_package_type == 'rpm' %}
{% set masakari_monitors_packages = [
'cyrus-sasl-md5',
'cyrus-sasl-scram',
'python3-libvirt',
'pacemaker-cli',
'tcpdump',
] %}
{% elif base_package_type == 'deb' %}
{% set masakari_monitors_packages = [
'libsasl2-modules-gssapi-mit',
'python3-libvirt',
'pacemaker-cli-utils',
'sasl2-bin',
'tcpdump',
] %}
{% endif %}
{{ macros.install_packages(masakari_monitors_packages | customizable("packages")) }}
ADD masakari-monitors-archive /masakari-monitors-source
{% set masakari_monitors_pip_packages = [
'/masakari-monitors'
] %}
COPY masakari_monitors_sudoers /etc/sudoers.d/kolla_masakari_monitors_sudoers
RUN ln -s masakari-monitors-source/* masakari-monitors \
&& {{ macros.install_pip(masakari_monitors_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/masakari-monitors \
&& chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_masakari_monitors_sudoers
{% block masakari_monitors_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER masakari