summaryrefslogtreecommitdiff
path: root/docker/prometheus/prometheus-cadvisor/Dockerfile.j2
blob: 7714a02b39a3e961db40df81eef22ec9f4796d63 (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
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 %}
ARG prometheus_cadvisor_version=0.45.0
{% if debian_arch == 'arm64' %}
ARG prometheus_cadvisor_sha256sum=bd6dad982c5950d6071ec2e1f9d474102ef3a00451395c58da9398297d35b174
{% else %}
ARG prometheus_cadvisor_sha256sum=9a2a0b69f58d932855c0af23b847cb9de8f8c32264f66f9fb5dcc8f359f34ccd
{% endif %}
ARG prometheus_cadvisor_url=https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor-v${prometheus_cadvisor_version}-linux-{{debian_arch}}
{% endblock %}


{% block prometheus_cadvisor_install %}
RUN curl -o /tmp/cadvisor ${prometheus_cadvisor_url} \
    && echo "${prometheus_cadvisor_sha256sum} /tmp/cadvisor" | sha256sum -c \
    && mv /tmp/cadvisor /opt \
    && chmod 0755 /opt/cadvisor
{% endblock %}


{% block prometheus_cadvisor_footer %}{% endblock %}
{% block footer %}{% endblock %}