forked from prometheus-community/elasticsearch_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (18 loc) · 1012 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
26
27
28
FROM quay.io/prometheus/golang-builder AS builder
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=boringcrypto
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-stig-mini-ubi9:1.2.0 AS ubi
COPY --from=builder /go/src/github.com/prometheus-community/elasticsearch_exporter/elasticsearch_exporter /bin/elasticsearch_exporter
EXPOSE 9114
ENTRYPOINT [ "/bin/elasticsearch_exporter" ]