Merge pull request #2754 from Wolphin-project/node-exporter

Node exporter
This commit is contained in:
Rolf Neugebauer 2017-11-20 22:10:39 +00:00 committed by GitHub
commit e3606477b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 5 deletions

View File

@ -15,7 +15,7 @@ services:
- name: dhcpcd
image: linuxkit/dhcpcd:48831507404049660b960e4055f544917d90378e
- name: node_exporter
image: linuxkit/node_exporter:a058fe1c6a4440a9689022a9fd7cffdcfd56d52c
image: linuxkit/node_exporter:1239aef345141a7e6a587a144f4b12aa54d0b1f1
trust:
org:
- linuxkit

View File

@ -1,7 +1,27 @@
FROM prom/node-exporter:v0.15.1@sha256:88c602650e861bb8045ac83421edecbd056fc58708d47554a0d1a10f19ed7556
FROM linuxkit/alpine:07f7d136e427dc68154cd5edbb2b9576f9ac5213 as build
RUN apk add --no-cache go git musl-dev make
ENV GOPATH=/go PATH=$PATH:/go/bin
ENV GITREPO=github.com/prometheus/node_exporter
ENV COMMIT=v0.15.1
RUN go get -d ${GITREPO} \
&& cd /go/src/${GITREPO} \
&& git checkout ${COMMIT} \
&& CGO_ENABLED=0 make build \
&& mv node_exporter /bin/
FROM scratch
ENTRYPOINT []
CMD []
WORKDIR /
COPY --from=build /bin/node_exporter /bin/node_exporter
ENTRYPOINT ["/bin/node_exporter", "--path.procfs", "/host/proc", \
"--path.sysfs", "/host/sys", \
"--collector.filesystem.ignored-mount-points", \
"^/(sys|proc|dev|host|etc)($|/)"]
LABEL org.mobyproject.config='{"pid": "host", "binds": ["/proc:/host/proc", "/sys:/host/sys", "/:/rootfs"], "capabilities": ["all"]}'

View File

@ -0,0 +1,2 @@
image: node_exporter
network: true

View File

@ -1,3 +0,0 @@
image: node_exporter
# Can't pull with content trust. Skip for now
# https://github.com/linuxkit/linuxkit/issues/2349