25

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!

Mina Han
  • 641
  • 2
  • 9
  • 17
  • Look here https://stackoverflow.com/questions/19335444/how-do-i-assign-a-port-mapping-to-an-existing-docker-container/63455911#63455911 – rofrol Aug 17 '20 at 17:59
  • Does this answer your question? [How do I assign a port mapping to an existing Docker container?](https://stackoverflow.com/questions/19335444/how-do-i-assign-a-port-mapping-to-an-existing-docker-container) – rofrol Aug 17 '20 at 17:59

5 Answers5

22

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
...
Johnny Oshika
  • 50,113
  • 37
  • 162
  • 257
14

Enter docker-machine with

docker-machine ssh 

there you should find your containers.

sudo ls /var/lib/docker/containers
orad
  • 14,033
  • 21
  • 72
  • 108
christian
  • 8,262
  • 10
  • 38
  • 51
  • 1
    Note that boot2docker is now deprecated. In new versions of docker, you can do the same but with `docker-machine ssh` instead. – Charles Wood Apr 28 '16 at 22:06
  • After entering the given commands, I got some encrypted texts. How do I know which are the images ? – Shreyas May 02 '16 at 12:44
  • 1
    @Shreyas Those long strings are actually names of container config directories. – orad May 03 '16 at 19:48
7

After review some post on Stackoverflow and Google. I found this directory :

C:\ProgramData\Microsoft\Windows\Hyper-V

Here you can fin the configuration with the Virtual Machines

C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

Another important thing is the images are virtualized by the Hyper-V, so the info should be stored here.

C:\Users\Public\Documents\Hyper-V\Virtual hard disks
Codes and Tags
  • 362
  • 2
  • 8
4

Update 2020 for WSL2

If you're using this with WSL2, docker images will be maintained inside of your wsl drive available at \\wsl$\ per this github issue:

  • Windows: \\wsl$\docker-desktop-data\mnt\wsl\docker-desktop-data\data\docker\volumes
  • Linux: sudo ls /mnt/wsl/docker-desktop-data/data/docker/volumes
KyleMit
  • 35,223
  • 60
  • 418
  • 600
1

Docker installed on windows with docker toolbox(using virtual box in place of hyper-v) one VM is created on at C:\Users\YOURUSERNAME\.docker\machine\machines with name default so you can find all VM files in default folder.

you can connect this vm using

docker-machine ssh

and you can find pulled images and container under this path (you may need to use sudo sometimes)

/var/lib/docker

Raghavendra
  • 1,301
  • 4
  • 18
  • 24