Where is docker image location in Windows 10?

前端 未结 13 1616
慢半拍i
慢半拍i 2020-12-08 09:06

I\' using Windows 10 Home operating system. I have installed Docker toolbox.

I have created docker image of my .net core application by using following command.

<
13条回答
  •  粉色の甜心
    2020-12-08 09:54

    The answers are really confusing because there is more than one way to run Docker in Windows. The newest way is with Windows 10 Home May 2020 Update. I will use the new version of Windows Subsystem for Linux (WSL2).

    After activating WSL2, you'll install Docker Desktop. Docker Desktop is a client that'll connect to the host inside the WSL.

    The image directory is somewhat inconsistent. If you run docker info in your host machine or inside WSL it will give you the path Docker Root Dir: /var/lib/docker which doesn't exist:

    $ ls /var/lib/docker
    ls: cannot access '/var/lib/docker': No such file or directory
    

    You'll find the images in

    /mnt/wsl/docker-desktop-data/
    

    Or in this Windows Explorer path:

    \\wsl$\docker-desktop-data\mnt\wsl\docker-desktop-data\data\docker\image
    

    If you are using Windows 10 non-Home versions, it may work differently. Take a look at the other answers. Since I don't have access to this OS, I won't try to answer.

提交回复
热议问题