Live data from Hacker News

Install Docker in WSL 2 Without Docker Desktop

nickjanetakis.com

21–25 of 25 posts

Re: Install Docker in WSL 2 Without Docker Desktop

#21
I wish I could do the opposite, to be honest. I like the Docker Desktop UI and all the command line utilities it auto-installs, but I want to use another Docker host like a VMware Workstation VM or even a remote machine. As of this writing you can just install Docker for Windows and disable a bunch of services + Hyper-V, and the CLI stuff can still work with other machines, but the desktop app just doesn't.

Re: Install Docker in WSL 2 Without Docker Desktop

#22

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 alloc…

Did you have your code within WSL2, or outside of it?

I/O performance is horrible in the second case. It's recommended to have your projects within WSL2. I've personally just bookmarked my projects folder that's within WSL2 so I can access it from Explorer as well.

Re: Install Docker in WSL 2 Without Docker Desktop

#23

What's the advantage of doing this? The drawbacks?

This option is interesting for organizations that cannot afford a monthly license for dozens of developers. Drawbacks... after working a couple of months I can say that time to time there are awful issues that came from nowhere, you need to mantain cleaning things in WSL constantly, so if the company can pay DD avoid the painful way

Re: Install Docker in WSL 2 Without Docker Desktop

#24

What's the advantage of doing this? The drawbacks?

The video goes into the pros and cons.

Pros (for not using DD):

    - You use less resources since you don't need a separate DD app running
    - It's more close to the experience you'd have on a production server which wouldn't run DD
Cons (by not using DD):

    - If you like having a UI, you won't have it
    - You can't use Docker extensions if that's something you want
    - You have to install Docker in each WSL 2 instance instead of checking a checkbox in the DD UI
Neutral (in either case):

    - You can still access things on localhost without DD
    - You can still run K8s directly in WSL 2 without DD using Kind and other tools
    - Everything works the same, there's no limitations around Docker's core feature set
    - Performance is really good (including volumes) as long as your files are in WSL 2's file system with or without DD
Post reply on HN