1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cat > run_node_exporter.sh << 'EOF'
docker stop cadvisor
docker rm cadvisor
docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor:latest
EOF
sh run_node_exporter.sh