aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j220
1 files changed, 20 insertions, 0 deletions
diff --git a/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2
new file mode 100644
index 000000000..92fdcb6e7
--- /dev/null
+++ b/docker/prometheus/prometheus-elasticsearch-exporter/Dockerfile.j2
@@ -0,0 +1,20 @@
+FROM {{ namespace }}/{{ image_prefix }}prometheus-base:{{ tag }}
+LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
+
+{% block prometheus_elasticsearch_exporter_header %}{% endblock %}
+
+{% block prometheus_elasticsearch_exporter_repository_version %}
+ENV elasticsearch_exporter_version=1.0.2
+{% endblock %}
+
+{% block prometheus_elasticsearch_exporter_install %}
+RUN curl -sSL -o /tmp/elasticsearch_exporter.tar.gz https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v${elasticsearch_exporter_version}/elasticsearch_exporter-${elasticsearch_exporter_version}.linux-{{debian_arch}}.tar.gz \
+ && tar xvf /tmp/elasticsearch_exporter.tar.gz -C /opt/ \
+ && rm -f /tmp/elasticsearch_exporter.tar.gz \
+ && ln -s /opt/elasticsearch_exporter* /opt/elasticsearch_exporter
+{% endblock %}
+
+{% block prometheus_elasticsearch_exporter_footer %}{% endblock %}
+{% block footer %}{% endblock %}
+
+USER prometheus