by laxis96 · 4y ago · 0 comments
Docker in WSL2? Yeah sure, but I'd rather install a VM or connect to a remote Docker host.
MinGW/MSYS2 have been around far longer and have none of those issues... Then again, MSYS2 does not have a Linux kernel running under it but that shouldn't be a problem unless you want to run containers.
Cross OS filesystem performance is poor. The solution is to keep everything within WSL. Code stored, built & edited in WSL.
VSCode + WSL extension makes it possible to "edit" from host without loosing performance.
No you didn't, you just let Windows hide them from you. WSL2 is essentially a Hyper-V VM running Linux with some programs bridging between it and the Windows host -- or two such VMs with some additional bridging (for Wayland and audio) if WSLg is enabled.
PS C:\Users\coolcold> netsh wlan show interfaces|wsl -- fgrep Mbps
Receive rate (Mbps) : 121.5
Transmit rate (Mbps) : 121.5
or, from WSL side, you can invoke Explorer for current folder via simple explorer.exe .
or notepad ..or..In all seriousness though, is there a reason ripgrep doesn’t suffice?
>Something something vim/emacs.
There's value in having a compatibility layer for a universal command line. Besides, even WSL2 is barely a VM
On serious side, even `findstr` is enough, but goal was to show interop in action, not to choose best grep alike solution.
On other serious side, I can ensure and enforce standardization on having WSL across the teams and departments and be sure such snippets work. Standardizing on ripgrep probably doesn't worth it.
For lonely/solo/indi technician that makes no sense and ripgrep can be better of course.
WSL is a proper VM, just managed very efficiently by Hyper-V.
> the filesystem has its (performance) limitations
It's a normal Linux filesystem, there's no difference in performance vs. a full-fledged Linux VM. (which it is anyway)
Are you referring to WSL1?
> It's a normal Linux filesystem, there's no difference in performance vs. a full-fledged Linux VM. (which it is anyway)
> Are you referring to WSL1?
WSL2 just exchanged the performance problems with the Linux guest environment's native filesystem for performance problems when the Linux guest accesses Windows' filesystem. Those are still there and they're still atrocious.
So I kinda disagree, for all things you mention I prefer WSL.
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].
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.
I don't EVER find that I need some kind of *nix command on my local machine when developing, but that's also because I'm not afraid of PowerShell / stuck on bash.
Have you sorted out how to get fuzzy tab completion in PowerShell, short of the buggy, menu-y integration available with fzf?
Do you find the everything you need is just already in PowerShell or so you sometimes run third party command line executables? If the latter, how do you deal with lack of man pages?
PS C:\Users\coolcold> netsh wlan show interfaces|wsl -- fgrep Mbps
Receive rate (Mbps) : 121.5
Transmit rate (Mbps) : 121.5Latest issue I encountered was that GNU parallel simple does not work. [1]
https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-dis...
Get-Content -Path Filepath -Tail <int>
You just did.