您好有没有人知道如何清理docker devicemapper文件?
我已经清理了所有图像/容器,但设备映射文件仍然异常大:
docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
gitlab/gitlab-ce latest 735fdb05ad5d 27 hours ago 1.225 GB
<none> <none> 06fefa4a9183 6 weeks ago 1.077 GB
rancher/agent-instance v0.6.0 134980b9bbfb 6 months ago 635.6 MB
<none> <none> 06d5beefe33e 6 months ago 635.6 MB
<none> <none> e172255e7648 6 months ago 495.6 MB
<none> <none> c20ca66652e8 6 months ago 495.6 MB
<none> <none> e736ae48fd3a 6 months ago 483.8 MB
<none> <none> 8239904dd749 6 months ago 472.1 MB
<none> <none> b780de634713 6 months ago 472.1 MB
<none> <none> eda17c9d109e 6 months ago 472.1 MB
<none> <none> 2ec6b457b5d8 6 months ago 300.6 MB
<none> <none> a15c0b4b75b1 6 months ago 300.6 MB
<none> <none> b6501c507a32 6 months ago 300.1 MB
rancher/agent v0.8.2 4de7ef5d11e3 8 months ago 365 MB
<none> <none> a0ff15f1f8ad 8 months ago 365 MB
<none> <none> 4bb3b77da9b1 8 months ago 365 MB
<none> <none> 8410b01d3f42 8 months ago 365 MB
<none> <none> 4068f49bc382 9 months ago 365 MB
<none> <none> 2a6ec0cadaec 9 months ago 365 MB
<none> <none> 8ca7bc756812 9 months ago 342.4 MB
<none> <none> b6cc9819d3f4 9 months ago 321.4 MB
<none> <none> d760275f41ff 9 months ago 306 MB
<none> <none> 1c524e41e113 9 months ago 305.5 MB
<none> <none> 4bec63e16966 9 months ago 260.8 MB
<none> <none> 574422a69939 9 months ago 256.7 MB
<none> <none> d5ddd9bb3635 9 months ago 247.2 MB
<none> <none> 44ae5d2a191e 9 months ago 188.3 MB
<none> <none> 62df8e845c12 9 months ago 188.3 MB
<none> <none> b6a4b778253d 9 months ago 188.3 MB
<none> <none> 7d8a588d75a5 9 months ago 188.1 MB
<none> <none> 3f55b715e2c4 2 years ago 299.7 MB
<none> <none> 1bc5ec756ec9 2 years ago 192.6 MB
<none> <none> 3463aff75755 2 years ago 192.7 MB
<none> <none> 1013ce565837 2 years ago 192.6 MB
<none> <none> 5806993e4389 2 years ago 192.6 MB
<none> <none> bd64f000e711 2 years ago 192.6 MB
<none> <none> e73baccf8d9e 2 years ago 192.6 MB
<none> <none> 6b7491a446ad 2 years ago 192.6 MB
<none> <none> c2910096a074 2 years ago 192.5 MB
<none> <none> cf2172af6603 2 years ago 192.5 MB
当devicemapper文件为30GB时,图像总和大约为15gb!
只有一个容器运行最多另外1gb。
有没有办法将它减少到合适的大小没有必须删除docker并从stratch重新安装?像垃圾收集工具之类的东西偶尔执行一次?
答案 0 :(得分:1)
使用以下命令:
docker rm -v $(docker ps -a -q -f status=exited)