
This change adds and unifies an ability to override hardcoded URLs for air-gapped environments via the usual blocks mechanism. Also, this change replaces ENV with ARG instruction for the variables used only in building images, and uses bash variable expansion where it possible. This change is a continuation of the I46b77978926fc2b578a68d1aaa944b2198af0685 Change-Id: I1fbad333b1bc95484e6f4c5145d5936a0e2db84f Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
25 lines
901 B
Django/Jinja
25 lines
901 B
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_v2_server_header %}{% endblock %}
|
|
|
|
{% block prometheus_v2_server_repository_version %}
|
|
ARG prometheus_version=2.26.1
|
|
ARG prometheus_url=https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz
|
|
{% endblock %}
|
|
|
|
{% block prometheus_v2_server_install %}
|
|
RUN curl -o /tmp/prometheus.tar.gz ${prometheus_url} \
|
|
&& tar xvf /tmp/prometheus.tar.gz -C /opt/ \
|
|
&& rm -f /tmp/prometheus.tar.gz \
|
|
&& ln -s /opt/prometheus* /opt/prometheus \
|
|
&& mkdir -p /etc/prometheus /data
|
|
{% endblock %}
|
|
|
|
{% block prometheus_v2_server_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER prometheus
|