forked from openshift/node_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ocp
21 lines (16 loc) · 953 Bytes
/
Dockerfile.ocp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10 AS builder
WORKDIR /go/src/github.com/prometheus/node_exporter
COPY . .
RUN if yum install -y prometheus-promu; then export BUILD_PROMU=false; fi && make build
FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.10
LABEL io.k8s.display-name="OpenShift Prometheus Node Exporter" \
io.k8s.description="Prometheus exporter for machine metrics" \
io.openshift.tags="prometheus,monitoring" \
summary="Prometheus exporter for machine metrics" \
maintainer="OpenShift Monitoring Team <[email protected]>"
COPY --from=builder /go/src/github.com/prometheus/node_exporter/node_exporter /bin/node_exporter
RUN yum install -y virt-what && yum clean all && rm -rf /var/cache/*
COPY text_collectors/virt.sh text_collectors/boots.sh /node_exporter/collectors/init/
EXPOSE 9100
USER nobody
ENTRYPOINT [ "/bin/node_exporter" ]