Comments on How to identify which Docker container an overlay is for?
Post
How to identify which Docker container an overlay is for?
Docker stores data under directories like /var/lib/docker/overlay2/xyz123
. These sometimes grow very large, and Docker does not provide good instructions for how to easily manage the space used by these. I assume IDs like xyz123
somehow correspond to containers.
Occasionally, I notice that one of these is very large, eg. 10 GB. If all I know is the path of the overlay dir, how can I figure out which container this was for, so I can decide if it's something that I can clean up?
Note: When this point is brought up, it often conjures long arguments about whether it's bad to mess with these overlay dirs manually. I'm not asking about deleting them manually in this question, so let's not get into that here. I am only asking how to identify which container/image is responsible for a given overlay directory.
1 comment thread