mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
pkg/node_exporter from sources
Signed-off-by: Marco Mariani <marco.mariani@alterway.fr>
This commit is contained in:
parent
41a4c2df10
commit
01d0a1835c
@ -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", \
|
ENTRYPOINT ["/bin/node_exporter", "--path.procfs", "/host/proc", \
|
||||||
"--path.sysfs", "/host/sys", \
|
"--path.sysfs", "/host/sys", \
|
||||||
"--collector.filesystem.ignored-mount-points", \
|
"--collector.filesystem.ignored-mount-points", \
|
||||||
"^/(sys|proc|dev|host|etc)($|/)"]
|
"^/(sys|proc|dev|host|etc)($|/)"]
|
||||||
LABEL org.mobyproject.config='{"pid": "host", "binds": ["/proc:/host/proc", "/sys:/host/sys", "/:/rootfs"], "capabilities": ["all"]}'
|
LABEL org.mobyproject.config='{"pid": "host", "binds": ["/proc:/host/proc", "/sys:/host/sys", "/:/rootfs"], "capabilities": ["all"]}'
|
||||||
|
|
||||||
|
2
pkg/node_exporter/build.yml
Normal file
2
pkg/node_exporter/build.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
image: node_exporter
|
||||||
|
network: true
|
@ -1,3 +0,0 @@
|
|||||||
image: node_exporter
|
|
||||||
# Can't pull with content trust. Skip for now
|
|
||||||
# https://github.com/linuxkit/linuxkit/issues/2349
|
|
Loading…
Reference in New Issue
Block a user