Path changes in Docker Desktop for Windows

I installed the newest Docker Desktop for Windows 4.42.1 (196648) on Windows 11 and used docker info and docker inspect to examine Docker’s path information.

PS C:\Users\Chansey> docker info | Select-String -Pattern 'root' -CaseSensitive:$false  
WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is set  
 Docker Root Dir: /var/lib/docker  

So where is /var/lib/docker?

There is no \\wsl.localhost\docker-desktop\var\lib\docker.

I also tried to inspect the container.

C:\Users\Chansey>docker inspect 7de48ea44986  | Select-String -Pattern 'path' -CaseSensitive:$false  
        "Path": "/docker-entrypoint.sh",  
        "ResolvConfPath": "/var/lib/docker/containers/7de48ea449861926871a6a90c52e5eb7e893f467b222e02cf92298b2beb64f65/resolv.conf",  
        "HostnamePath": "/var/lib/docker/containers/7de48ea449861926871a6a90c52e5eb7e893f467b222e02cf92298b2beb64f65/hostname",  
        "HostsPath": "/var/lib/docker/containers/7de48ea449861926871a6a90c52e5eb7e893f467b222e02cf92298b2beb64f65/hosts",  
        "LogPath": "/var/lib/docker/containers/7de48ea449861926871a6a90c52e5eb7e893f467b222e02cf92298b2beb64f65/7de48ea449861926871a6a90c52e5eb7e893f467b22  
2e02cf92298b2beb64f65-json.log",  
            "MaskedPaths": [  
            "ReadonlyPaths": [  
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",  

Where is /var/lib/docker/containers/?

There is no \\wsl.localhost\docker-desktop\var\lib\docker\containers as well.

After some research, I found that the real path of the Docker Root Dir seems to be located at \\wsl.localhost\docker-desktop\mnt\docker-desktop-disk\data\docker. Also, starting from Docker Desktop 4.30.0, the docker-desktop-data no longer exists (many tutorials on the Internet point to this directory though).

Is the /var/lib/docker/containers/ still valid under WSL? Which environment can use this path to access the Docker Root Dir?

Additionally, I noticed that the directory structure of Docker Root Dir appears to have been reorganized.

For example, in the ./overlay2/ directory, I can no longer find the UnionFS like CONTAINER_ID/merged/, etc. Instead, there is now \\wsl.localhost\docker-desktop\mnt\docker-desktop-disk\data\desktop-containerd\daemon\io.containerd.snapshotter.v1.overlayfs\snapshots, but I don’t know about the underlying logic.

Is there any reference explaining these changes?

Thanks.

Since Docker Desktop is “just” a desktop on top of a virtual machine (for Linux containers), the data will be in the virtual machine. You won’t find it easily and you don’t have to. Recent Docker Desktop for Windows has no docker-desktop-data distribution, only a data disk mounted into the virtual machine and into the system container that runs the Docker CE daemon.

I wrote about the data here:

https://dev.to/rimelek/everything-about-docker-volumes-1ib0#where-does-docker-store-data

and why we don’t need the data folder usually

https://dev.to/rimelek/everything-about-docker-volumes-1ib0#editing-files-on-volumes

If you search for “nsenter” on the forum, you can find some posts where we explained how you could ru a command in the system container that runs the daemon. For example here:

What you found is probably the path of the system containers’ files. Those are running as containerd containers, not as Docker containers.