手动删除卷和容器中的文件后,如何强制Docker释放存储空间? [英] How to Force Docker to release storage space after manual delete of file in volumes and containers?

查看:699
本文介绍了手动删除卷和容器中的文件后,如何强制Docker释放存储空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的存储空间问题很少。我删除了一些大文件,例如日志文件(在找到大文件的unix之后)。



问题是手动删除了某些Docker文件(在/ var / lib /码头工人/ ...)。删除Docker文件后,我可以看到剩余空间没有变化。 Docker不释放空间。



我重新启动服务Docker,然后问题就解决了。



如何强制Docker从(设备映射器,卷,映像等)释放空间?

解决方案

Docker清理工作根本不存在,您基本上可以自己完成。正如此博客文章中指出的,有多种方法可以实现,但是我宁愿使用第三种方法,方脚本,例如: docker-clean 清理docker留下的一些混乱局面。 / p>

I have few issues with storage spaces. I deleted few big files such as log files (after find unix of big files).

The problem is that delete manually some file of Docker (in /var/lib/docker/...). After deletion of Docker files, I can see that the space left does not change. Docker does not release space.

I restart the service Docker and I the problem persit.

How can I force Docker to release space from (devicemapper, volume, images, ...) ?

解决方案

Docker cleanup job is rather non-existing and you are basically in charge of doing it yourself. There are ways of doing that as pointed out in this blog-post, yet I rather use third-party scripts, e.g.: docker-clean to clean up some of the mess docker leaves behind.

这篇关于手动删除卷和容器中的文件后,如何强制Docker释放存储空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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