Home  >  Q&A  >  body text

Docker 的文件越来越大怎样理解?

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
巴扎黑巴扎黑2705 days ago818

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-04-24 09:11:09

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

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-24 09:11:09

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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-24 09:11:09

    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.

    reply
    0
  • Cancelreply