Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A 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 ...

1 answer  ·  posted 2d ago by matthewsnyder‭  ·  last activity 1d ago by GeraldS‭

Question docker
#1: Initial revision by user avatar matthewsnyder‭ · 2024-11-13T01:23:22Z (2 days ago)
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.