4 ms·
I have been using the wsl2 for a while now as a primary dev environment and so far it has been a great experience. Compared to wsl1, everything from nginx to mo
by tbronchain 6y ago
I have been using the wsl2 for a while now as a primary dev environment and so far it has been a great experience.
Compared to wsl1, everything from nginx to mongo, docker etc. works out of the box and isn't a pain anymore.
I've had issues (loosing network until reboot) with VPNs, core isolation and something, somewhere, in the way windows was managing routes and vswitch nat. But it has been fine since the recent 2004 update.
Quite surprisingly, VcXsrv works very well as well out of the box. No additional configuration to what's mentioned in the article has been needed.
Running a full GUI is a bit over the top but being able to run Linux GUI apps is sometimes a must.
This setup is all I've been asking for a long time and is worth trying to anyone who devs on Linux but wants to run windows as everyday OS.
- vetinari 6y agoDocker works for you? How? Is it really docker for linux, or docker for windows to which you talk via socket? All I've got trying to run docker was: System has not been booted with systemd as init system (PID 1). Can't operate. And it is right, WSL2 uses it's own init system that basically launches bash.
- raesene9 6y agoIME Docker for Windows works pretty well with WSL2. it just mounts the socket file into the WSL2 instance from the Docker instance, for most purposes it's pretty seemless. There are some oddness with things like `--net=host` as the daemon is running in effectively another VM, but for standard Docker workflows it's been fine.
- markawesome 6y agoStartup time for Docker is about 15 seconds, compared to Linux which is immediate. You're also going to get additional slowness because Docker is running inside another VM.
- raesene9 6y agoIf you're talking about time to launch a container, that's nothing like the times I'm seeing, is there perhaps a problem with your setup? time docker run -d nginx 0c65064fc675427f0d49b837f368b6d17c3b42b2aa21bf80222baeb7ed20ed2b real 0m1.556s user 0m0.018s sys 0m0.068s
- markawesome 6y agoI was referring to the actual Docker service startup time for Windows. Once it is started, of course it is going to be much faster. I'm getting half that on Linux on an computer from 2012.
- sz4kerto 6y agoDocker for Linux. The proper one. Do not use systemctl, just: sudo service docker start .. voila
- tbronchain 6y agoThat's how I do it. Same goes for most services. A difference between WSL and standard Linux is that is doesn't have a startup service manager, so you need to start services manually.
- thawkins 6y agoDoes it have an rc.local equiv that you can script those service starts into. Something like the docker entry-point would also work.
- vetinari 6y agoThanks, this works.
- 3np 6y agoWould podman be a better match for with WSL2 perhaps?