Install Docker in WSL 2 Without Docker Desktop
21–25 of 25 posts
Re: Install Docker in WSL 2 Without Docker Desktop
#22Curiously, 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…
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
#23What's the advantage of doing this? The drawbacks?
Re: Install Docker in WSL 2 Without Docker Desktop
#24What's the advantage of doing this? The drawbacks?
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