diff --git a/docker/prometheus/prometheus-v2-server/Dockerfile.j2 b/docker/prometheus/prometheus-v2-server/Dockerfile.j2 new file mode 100644 index 0000000000..6b12f27c1d --- /dev/null +++ b/docker/prometheus/prometheus-v2-server/Dockerfile.j2 @@ -0,0 +1,23 @@ +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 %} +ENV prometheus_version=2.23.0 +{% endblock %} + +{% block prometheus_v2_server_install %} +RUN curl -o /tmp/prometheus.tar.gz https://github.com/prometheus/prometheus/releases/download/v${prometheus_version}/prometheus-${prometheus_version}.linux-{{debian_arch}}.tar.gz \ + && 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 diff --git a/releasenotes/notes/add-prometheus-v2-6f62ed3702d465a0.yaml b/releasenotes/notes/add-prometheus-v2-6f62ed3702d465a0.yaml new file mode 100644 index 0000000000..b49d4d073d --- /dev/null +++ b/releasenotes/notes/add-prometheus-v2-6f62ed3702d465a0.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add `prometheus-v2-server` image for Prometheus version 2.x