What is docker image location on Windows 10

六月ゝ 毕业季﹏ 提交于 2019-11-30 06:09:55

On Windows 10, right click on the docker icon in the system tray (right hand side of task bar) and choose Settings... In the Advanced pane, you'll see something like:

  1. By using the docker info command.
  2. In the result - check for Docker Root Dir

This folder will conatins images, containers, ...

mine can be found in "C:\Users\Public\Documents\Hyper-V\Virtual hard disks"

When you have Windows Containers activated, your images are stored by default in C:\ProgramData\Docker\

To change this, you can edit the C:\ProgramData\Docker\config\daemon.json and add a new "graph" key with the new path... (notice that every backslash is escaped with another backslash)

Example:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": false,
  "graph": "D:\\ProgramData\\Docker"
}

After that, you need to restart Docker service and you can verify your changes using docker info command and look at Docker Root Dir entry.

Crapper

you can use below command to export your image and can copy same to linux / another machine docker export [OPTIONS] CONTAINER

example:

docker export --output="latest.tar" red_panda
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!