4 ms·
Compiling on WSL2 would have terrible performance. WSL2 is just there to try to entice companies to say their developers shouldn't need to move to Linux or Mac.
by encryptluks2 6y ago
Compiling on WSL2 would have terrible performance. WSL2 is just there to try to entice companies to say their developers shouldn't need to move to Linux or Mac. No one is seriously developing in WSL.
- kube-system 6y agoWhy would they need WSL2 to do that? AD and Office were and still are plenty enough to keep MS on corporate PCs.
- cptskippy 6y agoIt's not really targeted at compiling either. Think line of business apps on web technology like .NET Core, PHP, Python, etc... With WSL you can setup some docker containers or do some orchestration with Kubernetes and push it off to the cloud with minimal effort. If you really want a full Linux environment you can spin up a VM in Hyper-V. WSL just makes it easier to do things where a VM is a hassle.
- encryptluks2 6y agoDocker containers don't run in WSL.
- jhomedall 6y agoThey do in WSL2, as I understand it.
- encryptluks2 6y agoTry it out... install Ubuntu using WSL2. Install docker using apt-get. See that it doesn't work without the Docker Desktop install for Windows and a special integration. Try running podman or other container-based solutions and see that they don't work.
- jhomedall 6y agoHaving followed the instructions from https://docs.docker.com/engine/install/ubuntu/ https://docs.docker.com/engine/install/ubuntu/, I was able to get this working fine. This is without Docker Desktop installed. It probably would have also worked with the version from distro repository. zed@ZED-PC:~$ sudo service docker start * Starting Docker: docker [ OK ] zed@ZED-PC:~$ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world b8dfde127a29: Pull complete Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. The full output for 'docker run' was much longer, so I've snipped it down to size
- encryptluks2 6y agoAre you even on Windows? This is with WSL 2, as you can systemd doesn't work as expected in WSL2. This is a known issue. If systemd is working for you, then you are doing something magic: sudo systemctl start docker [sudo] password for u3332: System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down https://stackoverflow.com/questions/55579342/why-systemd-is-disabled-in-wsl https://stackoverflow.com/questions/55579342/why-systemd-is-...
- Liquid_Fire 6y agoIf you run the Docker daemon manually, it works just fine. I'm running a container on it right now. It's not a problem with Docker on WSL 2, but a problem with the way WSL uses its own init system instead of systemd, while some Ubuntu packages are packaged for a systemd system.
- jhomedall 6y agoFrom that link (permalink to answer: https://stackoverflow.com/a/61887923 https://stackoverflow.com/a/61887923) : > Nowadays you can try: > sudo service docker start > when using WSL2, if you are running on windows version 2004 or higher (I assume). Which is what I did in the listing above.
- nickstinemates 6y agoSure they do. https://i.imgur.com/TqW6Ola.png https://i.imgur.com/TqW6Ola.png
- encryptluks2 6y agoYou still have to install Docker Desktop and enable the integration. You can't simply install docker in your WSL2 distro and use it.
- nickstinemates 6y agoNot accurate. I don't have docker desktop and docker works fine for me in WSL2
- chokolad 6y ago> Compiling on WSL2 would have terrible performance. define terrible. Compared to what ? > No one is seriously developing in WSL. A very strong statement. Do you have any proof perhaps ?
- encryptluks2 6y ago> define terrible. Compared to what ? Terrible = significantly worse than a native Linux distro that doesn't use a file system integration layer. > A very strong statement. Do you have any proof perhaps ? Just experience working in the industry.
- garethrowlands 6y ago> worse than a native Linux distro that doesn't use a file system integration layer What filesystem integration layer?
- encryptluks2 6y agohttps://docs.microsoft.com/en-us/windows/wsl/compare-versions https://docs.microsoft.com/en-us/windows/wsl/compare-version... > We recommend against working across operating systems with your files https://nelsonslog.wordpress.com/2019/06/01/wsl-access-to-linux-files-via-plan-9/ https://nelsonslog.wordpress.com/2019/06/01/wsl-access-to-li...
- garethrowlands 6y agoYes, having your compiler on Linux access its files over plan9 would indeed have terrible performance. That's why Microsoft tell you not to do that. Just run everything on the Linux kernel and compilation will be the same as on Linux. You do have a choice of where you put your files.