Docker 的文件越来越大怎样理解?
巴扎黑
巴扎黑 2017-04-24 09:09:09
0
3
811

VPS 上的磁盘空间不够, 查了一下文件, 发现有很多文件, 特别是 Docker 安装目录当中有些文件非常大. 怎样理解其中的文件呢. Docker 相关的文件是否可以想办法缩小?

➤➤ sudo find / -xdev -type f -size +100M
/swapfile
/var/log/nginx/access.log
/var/lib/docker/containers/998d354cfc70b7c25669f9bbc2a8bf8a663d36f4a4c20946f630d5e4161a7e76/998d354cfc70b7c25669f9bbc2a8bf8a663d36f4a4c20946f630d5e4161a7e76-json.log
/var/lib/docker/aufs/diff/93bfdb4fbb87c00b899bd7685a0b32f53fd52b0e6deb370a819375d12c209c09/var/www/discourse/.git/objects/pack/pack-a04998dcdce7676932a4768d1c3e2076b27bd30b.pack
/var/lib/docker/aufs/diff/d69c7fe24577873cea0c49f8c88a243f4c05fde3054b0057baa72f3bc5056698/var/www/discourse/.git/objects/pack/pack-a04998dcdce7676932a4768d1c3e2076b27bd30b.pack
巴扎黑
巴扎黑

reply all(3)
左手右手慢动作

Try to clean up the logs in the image where docker is running. Maybe you can clear some space.

大家讲道理

Try this: Shellscript to delete orphaned docker volumes https://registry.hub.docker.com/u/martin/docker-cleanup-volumes/

Peter_Zhu

When you execute remove, you do not clear the cache files pulled down by docker pull, the logs generated by the mirror and other files. The more you pull, the larger the files will become until the disk is full.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!