Docker Community Forums

Share and learn in the Docker community.

Browes Docker Images content from Host OS

docker

(Paragpatil2006) #1

Hi All,
My requirement is I should be able to access files from pulled docker image even without running a container.
Is it possible using AUFS storage driver?

I can see respective layers with files in /var/lib/docker/aufs/diff/.
Using /var/lib/docker/aufs/diff/layers/* i can understand the hierarchy in which Layers are stacked.

How Can I detect what image is associated with what folders(layers) in /var/lib/docker/aufs/diff/ ??
When I do #docker inspect
Output shows digest. But not the layer ID that is there in /var/lib/docker/aufs/diff/ .

I am using docker 1.10.
Please help.


(David Maze) #2

Have you tried something like docker save the image to a tar file? The layer format is complex but at least it’s independent of the particular system setup.

You’re not guaranteed to be able to see what’s inside the /var/lib/docker directory. You mention AUFS, for instance, but if a given system is configured with devicemapper or one of the other storage drivers, the contents of the Docker storage space will be different.

Running containers is usually pretty straightforward, and I would be surprised if a system was set up so that you couldn’t run a container but could see Docker’s internal filespace. What is your actual goal with this task?