I managed to find the containers under directory /var/lib/docker/containers
, but I can\'t find the images.
What are the directories and files under
Actually, Docker images are stored in two files as shown by following command
$ docker info
Data file:
/var/lib/docker/devicemapper/devicemapper/data
Metadata file:
/var/lib/docker/devicemapper/devicemapper/metadata
For someone who is using Docker toolbox (that uses docker-machine), the answers concerning boot2docker on Mac OS X is not valid. The docker-machine VM is called "default" and it exists in the /Users/<username>/.docker/machine/machines/default/
directory.
On Fedora, Docker uses LVM for storage if available. On my system docker info
shows:
Storage Driver: devicemapper
Pool Name: vg01-docker--pool
Pool Blocksize: 524.3 kB
Base Device Size: 10.74 GB
Backing Filesystem: xfs
Data file:
Metadata file:
Data Space Used: 9.622 GB
...
In that case, to increase storage, you will have to use LVM command line tools or compatible partition managers like blivet.
The images are stored in /var/lib/docker/graph/<id>/layer
.
Note that images are just diffs from the parent image. The parent ID is stored with the image's metadata /var/lib/docker/graph/<id>/json
.
When you docker run
an image. AUFS will 'merge' all layers into one usable file system.
sudo docker info | grep -e "Root Dir"
check for the docker folder in /var/lib
the images are stored at below location:
/var/lib/docker/image/overlay2/imagedb/content