Hacker News new | ask | show | jobs
by lsaferite 1319 days ago
The DD WSL2 backend is also creating a VM in Hyper-V. Actually, it's creating two VMs (docker-desktop and docker-desktop-data). It's also running a proxy in your WSL2 VM so you can access the docker server. It's all a bit convoluted TBH.

I actually decided today to stop using DD on my Windows machine and just run docker native inside the WSL2 VM instance instead. Still not sure what solution I'm going for on my Mac.

4 comments

This is the way. It's even easier if you just winget install RedHat.Podman - that'll give you a tiny Fedora image where "docker" (podman) just works straight out of the box. No need to worry about getting iptables-legacy packages for your WSL distribution or whatever. It's so simple and lightweight, it feels like a much better solution than anything Docker ever did for Windows.
I do the same for the most part. I have the docker daemon setup both locally in Windows and also in WSL2. I then have multiple contexts setup in Windows so that I can easily switch between Windows/Linux containers from my host terminal. Thus far, I've not experienced any issues.

The initial setup was a little more complex than just running Docker Desktop, but since then, it's running flawlessly.

Talking about WSL2 in general: it creates one VM, with mount namespaces per "distro". That's why everything shares the same network (they didn't set up separate network namespaces). Also, the GUI support in Windows 11 is a separate mount namespace.
Well, yes, but it creates those when you log in. The proxy fixes some corp firewall issues (see other comments here). Start up is faster overall for me versus the normal backend.