1、Docker、Docker-Compose安装
https://www.cnblogs.com/a120608yby/p/9883175.html https://www.cnblogs.com/a120608yby/p/14582853.html
2、基于Docker-Compose部署Cadvisor
# vim docker-cadvisor/docker-compose.yml version: '3.2' services: cadvisor: image: gcr.io/cadvisor/cadvisor:latest container_name: cadvisor labels: org.label-schema.group: "monitoring" restart: always ports: - 8880:8080 networks: - ops_default privileged: true volumes: - /:/rootfs:ro - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker:/var/lib/docker:ro environment: - TZ=Asia/Shanghai networks: ops_default: external: true
3、启动服务
docker-compose up -d
4、查看服务启动状态
docker-compose ps
5、访问
访问地址:http://部署主机IP:8880/