No longer container ID is used to /var/lib/docker/aufs/diff/ with 1.10

A container’s thin writable layer is stored in a directory under /var/lib/docker/aufs/diff/. With Docker 1.10 and higher, container IDs no longer correspond to directory names.

When I was using Docker 1.9.0, the files in a container are located in /var/lib/docker/aufs/diff/“container-id”. But today I found out that Container-ID is no longer used after upgrading the version to 1.10.

In my project, I automatically need to locate files that used in a Docker container.

What corresponds to directory names under /var/lib/docker/aufs/diff?

I had a similar issue when trying to determine the mount point for a container under /var/lib/docker/aufs/mnt. I was able to find the mount-id for a named container by running the following command. Hope it helps.

$(cat /var/lib/docker/image/aufs/layerdb/mounts/$(docker inspect --format {{.Id}} <YOUR_CONTAINER_NAME>)/mount-id)

1 Like