docker rmi -f $(docker image ls)
docker rm -f $(docker ps -a -q)
1、创建infludb存储容器
docker run -d --name influxdb --net monitor -p 8083:8083 -p 8086:8086 tutum/influxdb
2、创建cadvisor
docker run -d --name=cadvisor --net monitor -p 8081:8080 --mount type=bind,src=/,dst=/rootfs,ro --mount type=bind,src=/var/run,dst=/var/run --mount type=bind,src=/sys,dst=/sys,ro --mount type=bind,src=/var/lib/docker/,dst=/var/lib/docker,ro google/cadvisor -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxdb:8086
3、创建grafana
docker run -d --name grafana --net monitor -p 3000:3000 grafana/grafana
默认用户名密码 admin/admin