volumes 文件映射关系
jiayanbo opened this issue · 1 comments
jiayanbo commented
大佬,我有个小疑问,为啥要挂载这几个目录
node-exporter:
volumes:
- /proc:/host/proc
- /sys:/host/sys
- /:/rootfs
cadvisor:
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
grafana:
volumes:
- ./data/grafana:/var/lib/grafana
loong576 commented
挂载这些目录表示容器需要读取操作系统/proc、/sys等数据