Live data from Hacker News

Install Docker in WSL 2 Without Docker Desktop

nickjanetakis.com

11–20 of 25 posts

Re: Install Docker in WSL 2 Without Docker Desktop

#13
post #3

Nice, I'll take a look. This has been my go-to reference up 'til now https://dev.to/bowmanjd/install-docker-on-windows-wsl-withou...

Thanks. I had looked at that reference originally too but it does a lot of things unrelated to running Docker on WSL 2 and overcomplicates running Docker. Realistically getting Docker to run on WSL 2 involves running a few standard install steps from Docker for installing Docker and Docker Compose v2 on Linux (such as Ubuntu, Debian or whatever distro you prefer) and then adding a 3 line shell script to your ~/.profi…

thats basically what I do... I didn't even realize there was the 'service' thing till a few months ago. Login, start the daemon, and go :-)

Re: Install Docker in WSL 2 Without Docker Desktop

#15
post #7

Earlier quoted context omitted.

That's the important question really. If it still requires a vm, then there is almost no difference between methods.

Where I really need docker, I also need VMware workstation more. It’s been a limiting factor for me. Was asking to ensure this wasn’t some trickery but sounds promising. I already have WSL working just didn’t think to try docker in that layer!

VMware and hyper-v have both worked on the same machine for some time now. since v15 or v14.

Re: Install Docker in WSL 2 Without Docker Desktop

#16

I was under the impression that docker installed in windows would manage system resources better than inside a wsl commissioner. I use lando, a docker compose wrapper. It’s instructions say to install docker inside wsl, but also warns of stability issues.

Last I checked, Docker desktop in windows requires a license for commercial users, whereas this method doesn't.

Docker Desktop requires a license for commercial users no matter which platform you use it on.

the Docker daemon and Docker CLI are open source and are free, even on Windows.

Re: Install Docker in WSL 2 Without Docker Desktop

#19
Curiously, WSL2 never worked well for me: for whatever reason the I/O performance was horrible (especially when bind mounting code in PHP containers for local development) and Hyper-V just worked way better. Plus, there was the fact that with Hyper-V I could control the total amount of resources allowed to Docker pretty easily, even if the RAM that was allocated was always taken up while running (dynamic memory allocation in Hyper-V never worked well for me anyways).

Either way, while I'm more than happy with Docker Desktop (my circumstances allow me to use it at no expense), there are also some promising projects out there that some of you might be interested in, provided that you want something more than just the CLI.

Podman Desktop: https://podman-desktop.io/

Rancher Desktop: https://rancherdesktop.io/

Post reply on HN