Docker Community Forums

Share and learn in the Docker community.

Where are images stored?


(David Buksbaum) #1

Expected behavior

The Docker app should minimally the file location of images pulled, and in a normal case allow that location to be set.

Actual behavior

I cannot find any information on this for the Docker for Windows Beta


PS> docker version
Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 19:36:04 2016
OS/Arch: windows/amd64

Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: a5315b8
Built: Mon Apr 18 08:49:13 2016
OS/Arch: linux/amd64

PS> docker info
Containers: 12
Running: 0
Paused: 0
Stopped: 12
Images: 21
Server Version: 1.11.0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 267
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Volume: local
Network: null host bridge
Kernel Version: 4.4.6
Operating System: Alpine Linux v3.3
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.955 GiB
Name: docker
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false

(Michael Friis) #2

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)?

(Vincent De Smet) #3

/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? :stuck_out_tongue:

(David Buksbaum) #4

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.


(Michael Bladowski) #5

how do i change the location ??? because “C” is not my biggest drive :slight_smile:

(Matthuisman) #6

In Windows 10,

  1. Stop docker etc
  2. Type “Hyper-V Manager” in task-bar search box and run it.
  3. Select your PC in the left hand pane (Mine is called DESKTOP-CBP**)
  4. Right click on the correct virtual machine (Mine is called MobyLinuxVM)
  5. Select “Turn off” (If it is running)
  6. Right click on it again and select “Move”
  7. Follow the prompts

(Pmw1014) #7

Nice! You fixed my problem

(7950) #8

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?

(Alexfung) #9

Thanks :grin:
how about C:\ProgramData\Docker? What is Docker doing with it? In particular, if it will grow big, how can I move it away from C:? :confused:

(Gilcon) #10

I am new with docker an also have this problem.
I just want to share my solution.

Before installing docker just change the location of the Virtual Hard Disk from the Hyper-V settings.
Then by default docker will install there.

(Rodrigojuarez) #11


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!!

Any information will be nice!!

(Artisticcheese) #12

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.


 "graph": "e:\\images" 

(Rodrigojuarez) #13

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


(Rodrigojuarez) #14

I found it!

I need to edit the settings inside the UI (I’m using windows containers), Docker will auto restart

After restart, using

docker info

I can see

Docker Root Dir: D:\vm\docker

(Manij) #16

Docker on Windows:

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?
“graph”: “I:\images”
“graph”: “E:\containers”

If not, what is the best way to handle this configuration?

(Michael Friis) #17

No, you cannot - images and containers are the same thing. A container is an image with a writable layer on top (and other things too). Details here:

(Ffisegydd) #18

Updating my settings via the UI to include:

  "graph": "..."

to set a custom location causes Docker to not restart properly. Looking into the logs it looks like the Docker daemon is not starting properly:

[12:38:03.428][DockerDaemonChecker][Error  ] Docker daemon is not running

Anyone else come across this and could advise on a solution?

Using 17.06.0-ce-win19 on Windows 10 Pro.

(Artisticcheese) #19

I use graph both on my Win10 and Windows 2016 machine with no issues. You need to start dockerd with -D switch and post debug logs here

(Saurabhgayali) #20

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.

Office PC-Windows 7
Home PC- Windows 10

(1extrafact) #21

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:

“data-root”: “d:\docker”

details here