docker 清理磁盘

docker 清理

  • 查看docker当前使用情况
[root@master ~]# docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              0                   0                   0B                  0B
Containers          0                   0                   0B                  0B
Local Volumes       0                   0                   0B                  0B
Build Cache         0                   0                   0B                  0B
  • 清除不用的镜像
[root@master ~]# 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

Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B

也可以安装一个可视化工具

  • portainer
    准备工作
mkdir -p /data/portainer/data /data/portainer/public
cd cd /data/portainer
wget https://dl.quchao.net/Soft/Portainer-CN.zip
unzip Portainer-CN.zip -d public

安装部署

docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name prtainer portainer/portainer
posted @ 2021-02-04 13:50  樊若熙  阅读(77)  评论(0)    收藏  举报