Thanks for your post. To clarify, are you curious about the placement of the docker images (they’re in the hyper-v VM) or the Hyper-V VM harddrive (it’s typically in C:\Users\Public\Documents\Hyper-V\Virtual hard disks)?
/var/lib/docker is mounted on the persistent Virtual Disk of the VM which is under C:\Users\Public\Documents\Hyper-V\Virtual hard disks - doesn’t that answer both?
Ok. Thanks Michael and Vincent. To confirm, docker is storing the images in the Moby instance, so its all in the virtual disk. Which means, that if I need to relocate the storage to another physical drive (outside of hyper-v), I have to move that file - and of course change the VM info, or make that folder a symbolic link (or similar) to somewhere else.
Thank you. I was worried about maxing out my C drive, which is not very large.
There is still a confusion lingering in my mind. When I create a new image using docker build, I get the last line of the log as
Successfully built a854b5869839.
However when I look for images in C:\ProgramData\docker\windowsfilter or C:\ProgramData\docker\containers I do not find any folder with a similar name (which I believe I read somewhere on Stackoverflow houses the images).
Where is this image a854b5869839 located?
Any way my “C:\Users\Public\Documents\Hyper-V\Virtual hard disks” folder is empty. Any idea on this?
All the hyperv configuration is not related to windows containers, right?
Like alexfung says, looks like all data is stored in C:\ProgramData\Docker
I need to download images and create containers in other drive than c too!!
Create file called c:\programdata\docker\config\daemon.json with content below where e:\images is location where do you want to store all you images etc. restart docker.
I added the data as you sugested, after restarting the docker service and try to view the existing images I got the following error
c:\desarrollo>docker images
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
I’m sure that my new images folder exist
When I restart my computer my modification to daemon.json file is lost
I just got a daemon.json file like this
I would like to store images on 1 iSCSI volume and store containers a different iSCSI volume.
Can you use “graph” multiple times in the daemon.json config file to tell Docker that images are on 1 volume and containers are on a 2nd ( different ) volume?
ex.
“graph”: “I:\images”
“graph”: “E:\containers”
If not, what is the best way to handle this configuration?
My problem is different. My home internet is limited and therefore I mostly downloaded ubuntu image for my windows in my office. How shall I proceed to use this image with windows on my Home PC.
Hi - in case anyone’s running into this now (May 2018), you can change the location where Windows images are stored by setting this in the daemon config file: