[HN Gopher] Install Docker in WSL 2 Without Docker Desktop
       ___________________________________________________________________
        
       Install Docker in WSL 2 Without Docker Desktop
        
       Author : nickjj
       Score  : 25 points
       Date   : 2022-11-22 18:48 UTC (4 hours ago)
        
 (HTM) web link (nickjanetakis.com)
 (TXT) w3m dump (nickjanetakis.com)
        
       | makeitrain wrote:
       | 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.
        
         | jollyllama wrote:
         | Last I checked, Docker desktop in windows requires a license
         | for commercial users, whereas this method doesn't.
        
       | jollyllama wrote:
       | 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...
        
         | nickjj wrote:
         | 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 ~/.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.
        
           | auditor_3d wrote:
           | Does this method still require hyper-v?
        
             | nickjj wrote:
             | 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 2 is providing the Linux environment.
             | There is no separate VM running Docker.
             | 
             | Try it out and let us know.
        
               | anderspitman wrote:
               | WSL2 definitely works on Windows 10 Home, which doesn't
               | have Hyper-V. My understanding is that they split off the
               | VM functionality needed for WSL2 into the "Virtual
               | Machine Platform" feature so that pro+ is no longer
               | required.
        
             | proxysna wrote:
             | That's the important question really. If it still requires
             | a vm, then there is almost no difference between methods.
        
               | auditor_3d wrote:
               | 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!
        
       | tester756 wrote:
       | Great news,
       | 
       | Using Docker inside WSL 2 has been painful for years, that's nice
       | to see that things are getting better.
        
       ___________________________________________________________________
       (page generated 2022-11-22 23:01 UTC)