I don’t even think I fully understand exactly what this folder is, but bottom line, its massive. There is no reasonable reason this directory is huge that I know of. All docker containers that can/should store information should store it on another drive, etc.
How can I find out what is taking up all this room and fix it?
I did try a prune command, and it deleted some things, but the overlay2 folder is still 60x bigger then I reasonably think it should be.
Which of the prune
commands did you run?
What does docker system df
tell you?
The overlay2 folder contains all image layers, and all container filesystems including the write layer of containers.
Bad image design or configuration can lead to excessive storage use:
- if an image comes with one or more huge file that get changed in the container, as a result the write- layer of the container filesystem will have the changed copies of the huge files. (Possible scenario: database image with pre-populated database)
- If the application inside the container has excessive logging, for instance with log level TRACE or DEBUG, but don’t write the logs into a volume or to the console.
You can use docker diff <container name or id>
to see if files end up in the write-layer of the container filesystem.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.