Hacker News new | past | comments | ask | show | jobs | submit login

Filesystem things are faster in WSL+Docker than native Windows for me. At least npm stuff. I'd rather skip the hassle of VM, and why use a remote Docker host? And same with MinGW. I like being able to just do stuff out of the box as if it was an Ubuntu install. Much more ergonomic, and can just follow whatever official guide for the tool I'm trying to use, without depending on someone making it possible to use in MinGW/MSYS.

So I kinda disagree, for all things you mention I prefer WSL.




Same here, Docker for windows is slow, like VERY slow. After I moved Docker to WSL2 my app is starting and running at least 10 times faster. The difference is so huge that I wonder why it is even possible to use Docker natively on Windows file system. It's crazy. I'm talking 60-90 seconds to bootstrap and run each page each time under Windows filesystem to around 5s (yes the app is very slow) under WSL2


> I wonder why it is even possible to use Docker natively on Windows file system

Wait, is it? I thought that Docker on Windows has always run in a VM. Used to be Hyper-V directly and now they're moving towards WSL2[0].

[0]: https://www.docker.com/blog/docker-hearts-wsl-2/


Yeah, You need Hyper-V to run basic Docker configuration on Windows, I just simplified this too much I guess.

The end result is that if you run Docker on Windows with Hyper-V alone it's using Window filesystem and then "translating" this for Docker therefore making the whole process of accessing the files incredibly slow.

I used to work with docker using Docker Kinematic (https://github.com/docker/kitematic) in the past, which basically was a Virtual box with Docker installed inside this VM, and since the VM was some kind of Linux, it worked reasonably well.

The same seems to be the case when using WSL2 - you run VM and Docker inside this VM, removing the file sync/translation part out of the equation, resulting in speed boots.


> The same seems to be the case when using WSL2 - you run VM and Docker inside this VM, removing the file sync/translation part out of the equation, resulting in speed boots.

I'm sure that this is true for most people out there, but for some random reason, WSL2 actually ran much slower for me than Hyper-V. It was one of those boring Laravel projects where you mount the application source into a container directory so PHP can execute them and serve you the results through Nginx with PHP-FPM or whatever you want, as opposed to just running something like a database or a statically compiled application.

Except that it was unusable with WSL2 as the Docker back end (regular Docker Desktop install), but much better with Hyper-V for the same goal. It was odd, because the experience of other devs on that exact same codebase was the opposite, WSL2 was faster for them. And then there was someone for whom WSL2 wouldn't work at all because of network connectivity issues.

I don't really have an explanation for this, merely an anecdote about how these abstractions can be odd, leaky or flawed at times, based on your hardware or other configuration details. That said, Windows is still okay as a desktop operating system (in the eyes of many folks out there) and I am still a proponent of containers, even if working with them directly inside of *nix as your development box is a more painless experience.


WSLv2 (which you need for Docker) is a VM. Windows just manages it for you.


Seen Podman Desktop, can replace Docker licenses.


I was playing with Docker Desktop and Podman Desktop for the first time yesterday. Podman Desktop looks really good. I was impressed with how well it integrated with the docker engine I already had running, and it even had at least one feature I couldn't find in Docker Desktop (pulling an image from the GUI).


Unfortunately last time I tried it on Windows it doesn't integrate with the existing wsl Linux distributions the same way docker desktop does.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: