windowsdockerdiskspaceimage-size

Default location where docker images are saved on Windows 10


I installed docker on Windows 10 Pro and created/pulled several images some as big as 953 MB.

I'm however interested to know in what directory are all the images stored.

I checked Hyper-V manager for Virtual Hard Disks and Virtual Machines directories but they are not more than 500 KBs

Below is the snapshot of the same.

enter image description here

My docker was installed with default settings.

After reading some forums I also checked the following directories like C:\ProgramData\Docker and C:\Users\Public\Documents\Hyper-V but they are 0 bytes in size.

I'm using Windows 10 Pro

I did inspect an image but it does not contain any data indicating the image file on Windows. See below:

C:\Users\HOME>docker image inspect myfirstcont

"GraphDriver": {
    "Data": {
        "LowerDir": "/var/lib/docker/overlay2/rtdgjoc6gg00v0l0h381fy4gw/diff:/var/lib/docker/overlay2/squ8lhqlwajh2yv1ecc9yltaj/diff:/var/lib/docker/overlay2/819dca1c2bb7ce54c13c0c7421e5804538a9605b4daf0f8ab52a47024cb96d29/diff:/var/lib/docker/overlay2/12c27601a0dc2397cf87405d2ece5757d5f6d45e1c38e1c58cef4de1964ea04f/diff:/var/lib/docker/overlay2/d0862b28727db9ac5a3fed6eb3caad3968b8824919c4b5de742a25ca89b7b1dd/diff:/var/lib/docker/overlay2/c82c5574cb3aac2600976a38093c98e575c6d3e32aee7b9e548dc4f8ed3678b9/diff:/var/lib/docker/overlay2/5461792a7a73055859f45c624450a4d06f212e4437d9d1f81a012a2fa932a620/diff:/var/lib/docker/overlay2/f130395cf64a6182fdb6bd8f18e4a64f5763856464cded60f01214b8d695e56c/diff:/var/lib/docker/overlay2/a122314ee57fd42eb80b9d367cc579402afd36d0484579b97b0074d692cb0ec2/diff:/var/lib/docker/overlay2/e2c0039edd02283fce0f7e7a3f3bd798d2597b7c26ad85280db804d83697d238/diff:/var/lib/docker/overlay2/0bf984e8907a11ac4f000f1d7909f61dd6aac497517c6fb2a6947cf683ad3993/diff",
        "MergedDir": "/var/lib/docker/overlay2/lv5akhtcyzkioljls2bfolgdu/merged",
        "UpperDir": "/var/lib/docker/overlay2/lv5akhtcyzkioljls2bfolgdu/diff",
        "WorkDir": "/var/lib/docker/overlay2/lv5akhtcyzkioljls2bfolgdu/work"
    },
    "Name": "overlay2"
},

Can you please suggest where can I find the image files for all the docker images I pulled?


Solution

  • When using WSL2 with Docker Desktop, a new distro is created called docker-desktop-data, which is also where all your image layers are stored. You can find all your layers under \\wsl$\docker-desktop-data\version-pack-data\community\docker\overlay2.

    You will have to docker image inspect <image_id> and look for GraphDriver.Data to find which directories are related to your docker images.