elasticsearch/example/images/elasticsearch-exporter/Dockerfile
2024-06-05 16:05:41 +02:00

26 lines
1.0 KiB
Docker

FROM danielberteaud/alpine:24.6-2 AS builder
ARG ES_EXPORTER_VERSION=1.7.0
RUN set -eux &&\
apk add curl ca-certificates &&\
cd /tmp &&\
curl -sSLO https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v${ES_EXPORTER_VERSION}/elasticsearch_exporter-${ES_EXPORTER_VERSION}.linux-amd64.tar.gz &&\
curl -sSLO https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v${ES_EXPORTER_VERSION}/sha256sums.txt &&\
grep "elasticsearch_exporter-${ES_EXPORTER_VERSION}.linux-amd64.tar.gz" sha256sums.txt | sha256sum -c &&\
tar xzf elasticsearch_exporter-${ES_EXPORTER_VERSION}.linux-amd64.tar.gz &&\
mv elasticsearch_exporter-${ES_EXPORTER_VERSION}.linux-amd64/elasticsearch_exporter /
FROM danielberteaud/alpine:24.6-2
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
RUN set -eux &&\
apk --no-cache upgrade &&\
apk add ca-certificates
COPY --from=builder /elasticsearch_exporter /usr/local/bin/
EXPOSE 9114
USER 9114
CMD ["elasticsearch_exporter"]