aboutsummaryrefslogtreecommitdiff
path: root/docker/ironic/ironic-prometheus-exporter/Dockerfile.j2
blob: 09ab2b7fc1cbf557a9f78da9cbd10ca25995e3d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM {{ namespace }}/{{ image_prefix }}ironic-conductor:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

USER root

{% block ironic_prometheus_exporter_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if base_package_type == 'rpm' %}

    {% set ironic_prometheus_exporter_packages = [
        'httpd',
        'mod_ssl',
    ] %}

{{ macros.install_packages(ironic_prometheus_exporter_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_package_type == 'deb' %}
    {% set ironic_prometheus_exporter_packages = [
        'apache2',
    ] %}

{{ macros.install_packages(ironic_prometheus_exporter_packages | customizable("packages")) }}
RUN echo > /etc/apache2/ports.conf

{% endif %}

ENV IRONIC_CONFIG /etc/ironic/ironic.conf

COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start

{{ macros.kolla_patch_sources() }}

{% block ironic_prometheus_exporter_footer %}{% endblock %}
{% block footer %}{% endblock %}