forked from prometheus-community/elasticsearch_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (16 loc) · 960 Bytes
/
Dockerfile
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
FROM quay.io/prometheus/golang-builder AS builder
ARG PROMU_VERSION=0.13.0
ADD https://github.com/prometheus/promu/releases/download/v${PROMU_VERSION}/promu-${PROMU_VERSION}.linux-amd64.tar.gz ./
RUN tar -xvzf promu-${PROMU_VERSION}.linux-amd64.tar.gz && mv promu-${PROMU_VERSION}.linux-amd64/promu /go/bin
ADD . /go/src/github.com/prometheus-community/elasticsearch_exporter
WORKDIR /go/src/github.com/prometheus-community/elasticsearch_exporter
RUN go mod download
RUN make
FROM scratch AS scratch
COPY --from=builder /go/src/github.com/prometheus-community/elasticsearch_exporter/elasticsearch_exporter /bin/elasticsearch_exporter
EXPOSE 9114
ENTRYPOINT [ "/bin/elasticsearch_exporter" ]
FROM quay.io/sysdig/sysdig-mini-ubi9:1.3.11 AS ubi
COPY --from=builder /go/src/github.com/prometheus-community/elasticsearch_exporter/elasticsearch_exporter /bin/elasticsearch_exporter
EXPOSE 9114
ENTRYPOINT [ "/bin/elasticsearch_exporter" ]