Docker图像吃了很多空间? [英] Docker images eats up lots of space?

查看:184
本文介绍了Docker图像吃了很多空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

docker ps -aq

只显示7-9图片。

/var/lib/docker/graph

显示n个图像数量。

当我创建一个文件时,由于系统完整的错误,我会收到写入错误。我试图创造符号链接。但是我无法移动所有的docker的东西。

When I create a file, I get write error due to system full error. I tried to create symbolic link. but I cannot able to move all the docker things.

删除/ var / lib / docker / graph下的所有内容是否很好?与创建符号链接和扩展磁盘有什么其他的可能性?我宁愿删除不必要的东西。

Is it good to remove everything under /var/lib/docker/graph? What are the other possibilities than creating symbolic link and extending disk? I would prefer deleting unnecessary things.

<none>                 <none>              02a16288ef14        6 days ago          773.3 MB
<none>                 <none>              21a606deee7e        6 days ago          773.3 MB
<none>                 <none>              8a38f2888018        6 days ago          773.2 MB
<none>                 <none>              f41395b7637d        6 days ago          773.3 MB
<none>                 <none>              8b82d707167c        6 days ago          773.3 MB


推荐答案

要摆脱运行以下操作:

$ docker rmi $(docker images -q -f dangling=true)

应该清除标有none的所有图像。请注意,图像将共享基本图层,因此Docker使用的磁盘空间总量将远远小于通过将所有图像的大小相加所得到的总数。

That should clear out all the images marked "none". Be aware however, that images will share base layers, so the total amount of diskspace used by Docker will be considerably less than what you get by adding up the sizes of all your images.

这篇关于Docker图像吃了很多空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆