Why is it recommended to run WSL2+docker desktop windows, instead of directly install docker on the WSL2 distro ?
It seems that both work but I read that the way to go is with docker desktop, I'm trying to understand why.
Thank you
The main difference between using Docker Desktop with the WSL2 integration and using docker directly in WSL2 without Docker Desktop is the level of integration with your tools.
When you use Docker desktop, you have access to docker in powershell/cmd, have access to your file on windows, the possibility to switch to Windows container and to use it with your IDE.
If you install docker inside your WSL2 distro, docker will not be accessible from Windows directly.
Thank you, so there isn't any performance or problem to consider by doing docker directly in the wsl2? I don't have strong usecase for windows container/ide integration and found few limitations around network (port forward is possible but not directly reaching the container ip).
Docker on WSL2 should have the same performance as Docker Desktop using WSL2 (as they use the WSL2 for running the docker daemon).
There is, at least in my tests, a decrease in memory consumption (five times less) if running docker inside WSL without docker desktop.
@jmaitrehenry When using WSL2+docker-for-windows with WSL integration, do we need to install docker CLI seperately on WSL2? If we does that, will it cause any conflicts?