Install Docker in WSL 2 Without Docker Desktop
nickjanetakis.com
Install Docker in WSL 2 Without Docker Desktop
1–10 of 25 posts
Re: Install Docker in WSL 2 Without Docker Desktop
#2Re: Install Docker in WSL 2 Without Docker Desktop
#3Nice, 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...
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 ~/.profile to ensure the init.d based Docker service starts when your WSL 2 process starts -- that's it.
I've been running this set up for months, it's super solid.
Re: Install Docker in WSL 2 Without Docker Desktop
#4Nice, 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…
Re: Install Docker in WSL 2 Without Docker Desktop
#5Earlier quoted context omitted.
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…
Does this method still require hyper-v?
I personally run Windows 10 Pro which does have Hyper-V enabled (I use Hyper-V for standalone VMs unrelated to Docker) so I can't disable it to check for you but I'd say I'm 99.99% sure it'll work without Hyper-V because this is focused on running an application (Docker) inside of a WSL 2 environment. If WSL 2 is available to run then Docker can run in it because WSL 2 is providing the Linux environment. There is no separate VM running Docker.
Try it out and let us know.
Re: Install Docker in WSL 2 Without Docker Desktop
#6Re: Install Docker in WSL 2 Without Docker Desktop
#7Earlier quoted context omitted.
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…
Does this method still require hyper-v?
Re: Install Docker in WSL 2 Without Docker Desktop
#8I 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.
Re: Install Docker in WSL 2 Without Docker Desktop
#9Earlier quoted context omitted.
Does this method still require hyper-v?
That's the important question really. If it still requires a vm, then there is almost no difference between methods.
Re: Install Docker in WSL 2 Without Docker Desktop
#10Earlier quoted context omitted.
Does this method still require hyper-v?
If you can run WSL 2 then you can use this method. I personally run Windows 10 Pro which does have Hyper-V enabled (I use Hyper-V for standalone VMs unrelated to Docker) so I can't disable it to check for you but I'd say I'm 99.99% sure it'll work without Hyper-V because this is focused on running an application (Docker) inside of a WSL 2 environment. If WSL 2 is available to run then Docker can run in it because WSL…