排查过程:df -h 查看磁盘空间占用情况
定位为docker的overlay目录占用空间过大
使用docker system prune -a清理以下内容
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
不带参数清理以下内容
docker system prune
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
清理无用容器可以有效避免overlay目录过大
清理docker日志文件可以减少overlay目录占用空间