Files
linuxkit/pkg/node_exporter/Dockerfile
Rolf Neugebauer 4fdad53190 pkgs: Update packages to the latest linuxkit/alpine
except for bpftrace, since it does not compile:
https://github.com/linuxkit/linuxkit/pull/3230

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-03 12:25:40 +00:00

26 lines
695 B
Docker

FROM linuxkit/alpine:518c2ed0f398c5508969ac5e033607201fb419ed 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.16.0
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)($|/)"]