kolla/docker/prometheus/prometheus-cadvisor/Dockerfile.j2
Christian Berendt 861f55fbfd Add block labels to all Dockerfiles
Change-Id: I9692dda817ef134d647247431565e1b58cf9da41
2020-03-01 17:25:58 +00:00

38 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ 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 %}