当我们在 Windows 上使用它时,docker 图像和容器存储在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30723839/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where are docker images and containers stored when we use it with Windows?
提问by Mina Han
NOTE: Am super new to both Windows and Docker
注意:对于 Windows 和 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.
我一直在使用的教程说/var/lib/docker/containers
如果我们使用 Linux,它们就在下面,但我似乎在我的 Windows 机器上找不到。
Thanks!
谢谢!
采纳答案by christian
Enter docker-machine with
输入 docker-machine
docker-machine ssh
there you should find your containers.
在那里你应该找到你的容器。
sudo ls /var/lib/docker/containers
回答by Johnny Oshika
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:
随着 Windows 10 周年更新,情况可能有所改变。我从这里的源代码安装了 Docker(https://master.dockerproject.org/windows/amd64/docker-1.13.0-dev.zip),如下所述:
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10
Docker puts all of the images in this folder:
Docker 将所有图像放在此文件夹中:
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
...
回答by Codes and Tags
After review some post on Stackoverflow and Google. I found this directory :
在查看 Stackoverflow 和 Google 上的一些帖子后。我找到了这个目录:
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.
另一个重要的事情是图像被 Hyper-V 虚拟化,所以信息应该存储在这里。
C:\Users\Public\Documents\Hyper-V\Virtual hard disks
回答by Raghavendra
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.
使用 docker 工具箱安装在 Windows 上的 Docker(使用虚拟框代替 hyper-v)在 atC:\Users\YOURUSERNAME\.docker\machine\machines
上创建一个 VM
,名称为,default
因此您可以在默认文件夹中找到所有 VM 文件。
you can connect this vm using
您可以使用连接此虚拟机
docker-machine ssh
docker-machine ssh
and you can find pulled images and container under this path (you may need to use sudo sometimes)
并且您可以在此路径下找到拉取的图像和容器(有时您可能需要使用 sudo)
/var/lib/docker
/var/lib/docker