Like Max says, Docker for WSL2 creates two distros docker-desktop
and docker-desktop-data
After some digging around I finally about the layer data, and it's here: \\wsl$\docker-desktop-data\version-pack-data\community\docker\overlay2
There you can access the layer diffs (not the entire image because that's not how docker stores them), take note though that the folders aren't named after image id nor its repo digest. To find the correct folder you need to run docker image inspect image_id_here
and look for GraphDriver.Data.UpperDir
(or just run docker inspect image_id_here -f "{{.GraphDriver.Data.UpperDir}}"
) which will contain the folder name after /overlay2/
.
Note: \\wsl$\docker-desktop-data\mnt\wsl\docker-desktop-data\
is redundant, that same path can be simplified to just \\wsl$\docker-desktop-data\
(for some reason, some distros are mounted to themselves).