Does anyone knows how to find to which docker container, image or volume an AUFS diff folder belongs?
I have a legacy file like this
/var/lib/docker/aufs/diff/d4f388f19d7b4e8e9eef2a4ae5630f87d59180263482fbc63dbe7d31b6c0fc5b/usr/lib/gcc/x86_64-linux-gnu/6/cc1
There's no container, volume or image with this ID d4f388f19d7b
I tried to find it inspecting each container, volume and image using the ID d4f388f19d7b
but no luck
for c in $(docker ps -q) ; do docker inspect $c | grep d4f388f19d7b ; done
empty response
for i in $(docker images -q) ; do docker image inspect $i | grep d4f388f19d7b ; done
empty response
for v in $(docker volume ls -q) ; do docker volume inspect $v | grep d4f388f19d7b ; done
empty response
Is there an easy way to identify which docker container/volume/image owns this file? lsof
shows that the file is not in use as it's a legacy file last time accessed was 3 months ago.
I am out of ideas
I found the way to map a diff folder to a container
grep DIFF_FOLDER_ID /var/lib/docker/image/aufs/layerdb/mounts/*/mount-id
it will give you the container ID, if you get empty output it means is orphaned or it belongs to a docker image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With