kolla/docker/prometheus/prometheus-ovn-exporter/Dockerfile.j2
Marcin Juszkiewicz 2c2dc39b3b prometheus-ovn-exporter: use sha256sum
shasum requires 30M of Perl on CentOS 9 while sha256sum is already
present.

Change-Id: I9372ebc643fced497ab01480f4c7cd6caa65c282
2022-09-02 11:49:25 +02:00

37 lines
1.3 KiB
Django/Jinja

FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block prometheus_ovn_exporter_header %}{% endblock %}
{% block prometheus_ovn_exporter_repository_version %}
{% if debian_arch == 'amd64' %}
ARG ovn_arch=x86_64
{% else %}
ARG ovn_arch={{ debian_arch }}
{% endif %}
ARG prometheus_ovn_version=1.0.4
ARG prometheus_ovn_cksum_url=https://github.com/greenpau/ovn_exporter/releases/download/v${prometheus_ovn_version}/checksums.txt
ARG ovn_exporter_tgz=ovn_exporter_${prometheus_ovn_version}_Linux_${ovn_arch}.tar.gz
ARG prometheus_ovn_url=https://github.com/greenpau/ovn_exporter/releases/download/v${prometheus_ovn_version}/${ovn_exporter_tgz}
{% endblock %}
{% block prometheus_ovn_exporter_install %}
RUN curl -o /tmp/${ovn_exporter_tgz} ${prometheus_ovn_url} \
&& curl -o /tmp/checksums.txt ${prometheus_ovn_cksum_url} \
&& cd /tmp \
&& sha256sum --ignore-missing -c /tmp/checksums.txt \
&& tar xvf /tmp/${ovn_exporter_tgz} -C /opt/ \
&& rm -f /tmp/${ovn_exporter_tgz} \
&& rm -f /tmp/checksums.txt
{% endblock %}
{% block prometheus_ovn_exporter_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER prometheus