mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
pkg: Add a Prometheus node_exporter package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
ab78f1a48c
commit
856a2651b0
6
pkg/node_exporter/Dockerfile
Normal file
6
pkg/node_exporter/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM prom/node-exporter:v0.14.0
|
||||
|
||||
ENTRYPOINT ["/bin/node_exporter", "-collector.procfs", "/host/proc", \
|
||||
"-collector.sysfs", "/host/sys", \
|
||||
"-collector.filesystem.ignored-mount-points", \
|
||||
"^/(sys|proc|dev|host|etc)($|/)"]
|
29
pkg/node_exporter/Makefile
Normal file
29
pkg/node_exporter/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
.PHONY: tag push clean container
|
||||
default: push
|
||||
|
||||
IMAGE=node_exporter
|
||||
SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
|
||||
|
||||
container: Dockerfile
|
||||
docker build --no-cache -t $(IMAGE):build .
|
||||
|
||||
hash: Dockerfile
|
||||
find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash
|
||||
|
||||
push: hash container
|
||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||
(docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
|
||||
docker push linuxkit/$(IMAGE):$(shell cat hash))
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
tag: hash container
|
||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
||||
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
clean:
|
||||
rm -rf hash
|
||||
|
||||
.DELETE_ON_ERROR:
|
Loading…
Reference in New Issue
Block a user