Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are docker images and containers stored when we use it with Windows?

Tags:

NOTE: Am super new to both Windows and Docker

The tutorial I've been using says that they are under /var/lib/docker/containers if we're using Linux, but I can't seem to find that on my Windows machine.

Thanks!

like image 946
Mina Han Avatar asked Jun 09 '15 05:06

Mina Han


People also ask

Where are docker images stored in Windows?

In a default installation, layers are stored in C:\ProgramData\docker and split across the "image" and "windowsfilter" directories. You can change where the layers are stored using the docker-root configuration, as demonstrated in the Docker Engine on Windows documentation. Only NTFS is supported for layer storage.

Where do docker images get stored?

The docker images, they are stored inside the docker directory: /var/lib/docker/ images are stored there.


2 Answers

Things might have changed with Windows 10 Anniversary Update. I installed Docker from source here (https://master.dockerproject.org/windows/amd64/docker-1.13.0-dev.zip) as described here:

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10

Docker puts all of the images in this folder:

C:\ProgramData\docker\windowsfilter 

and all containers in this folder:

C:\ProgramData\docker\containers 

An easy way to check is to execute this:

docker info 

It should tell you where your files are stored:

Containers: 2  Running: 1  Paused: 0  Stopped: 1 Images: 10 Server Version: 1.13.0-dev Storage Driver: windowsfilter  Windows: ... Docker Root Dir: C:\ProgramData\docker Debug Mode (client): false Debug Mode (server): false ... 
like image 83
Johnny Oshika Avatar answered Sep 18 '22 06:09

Johnny Oshika


Enter docker-machine with

docker-machine ssh  

there you should find your containers.

sudo ls /var/lib/docker/containers 
like image 31
christian Avatar answered Sep 19 '22 06:09

christian