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:
Thanks. This migrated the existing MobyLinuxVM to new drive/location!
One has to remember to change the path at two more locations for everything to work smoothly:
in Hyper-V manager --> Hyper-V Settings… path for virutal hard disks and virtual machines.
in docker context menu --> settings --> Advanced as well,
before restarting otherwise it creates one again in C: drive.
With these, docker errored out once, restarted machine and now everything is working well out of D: drive. Existing images, migrated in the first step (suggested by matthuisman) are accessible too!
Please note the important difference between Windows and Linux, when you switch to Windows Containers, you can set the the config (Settings → Docker Engine) to use a different drive
You cannot set something like “data-root”: “E:\windowscontainers” because that location does not exist inside the virtual disk. When using Linux Containers, you have to move the underlying Hyper-V Virtual Machine disk