Marcin Juszkiewicz 90adc2b851 introduce 'infra_image_prefix' for infra images
Defaults to 'image_prefix' for now but shows which images gets their
names changed soon.

Change-Id: I0608e8f62f28d6667b4c8753c47553e4cbf75503
2020-07-09 23:31:42 +02:00

38 lines
1.1 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_cadvisor_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% block prometheus_cadvisor_repository_version %}
ENV prometheus_cadvisor_version=0.35.0
{% endblock %}
{% if base_arch in ['x86_64'] %}
{% block prometheus_cadvisor_install %}
RUN curl -ssL -o /opt/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor && chmod 0755 /opt/cadvisor
{% endblock %}
{% else %}
{% if base_distro in ['debian'] %}
{% set cadvisor_packages = [
'libjs-bootstrap',
'libjs-jquery',
'https://snapshot.debian.org/archive/debian/20180503T060640Z/pool/main/c/cadvisor/cadvisor_0.27.1+dfsg2-1_arm64.deb'
] %}
{{ macros.install_packages(cadvisor_packages | customizable("packages")) }}
RUN ln -s /usr/bin/cadvisor /opt/cadvisor
{% endif %}
{% endif %}
{% block prometheus_cadvisor_footer %}{% endblock %}
{% block footer %}{% endblock %}