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.