You have piqued my curiosity. What does Docker Desktop do that the CLI cannot?
You have piqued my curiosity. What does Docker Desktop do that the CLI cannot?
The reason we launched Docker Desktop (initially known as "Docker for Mac") was to make the user experience better: easier to install, better integrated with the system (virtualization APIs, keychain, VPNs, etc), and better support for host volumes.
I do think it makes sense to add more GUI features over time, to make Docker more approachable - not everyone is a CLI wizard. But, it shouldn't make the app slower or annoying to use for those who don't need it.
- Install Ubuntu distro in WSL2.
- Create an ssh key pair on the Windows side using ssh-keygen.
In Ubuntu:
- Install Docker engine using Docker's apt-get instructions for Ubuntu.
- Add the ssh public key to ~/.ssh/authorized_keys.
In Windows:
- Run "wsl hostname -I" to get your WSL2 hostname.
- Test "ssh user@wsl-host", using the WSL2 hostname. It should work without prompting for a password.
- Unzip docker.exe somewhere.
- In your user environment variables, set PATH to include the directory with docker.exe, and set DOCKER_HOST to "ssh://user@wsl-host", using the WSL2 hostname.
That should be it; you should now be able to run docker normally from your Windows user, using file context from the Windows side.
But again, they're talking about Windows, not Linux-in-Windows or virtualized Linux on Windows. Just because you can do something in WSL2 doesn't mean you "can do it on Windows", as much as you "can run systemd and Wayland on Windows" because you could run it inside a Linux VM...
WSL1 yes, but not WSL2, which the parent explicitly mentioned. WSL2 is just virtualization with a fancier name, might as well use VirtualBox and similar at that point.