You're always going to get that performance hit with the hypervisor layer there.
You're always going to get that performance hit with the hypervisor layer there.
As I understand it, that what you describe is true of Docker for Mac, but not Docker for Windows which uses Windows' built-in container support (analogous to cgroups).
https://stefanscherer.github.io/how-to-run-lightweight-windo...
Edit: I looked it up. WSL2 continues to use a VM.
https://devblogs.microsoft.com/commandline/announcing-wsl-2/
No, the headline feature of WSL2 is it uses a real Linux kernel under a hypervisor, as opposed to WSL1's approach of a kernel driver running inside the NT kernel which partially emulates the Linux syscall API.
> Edit: I looked it up. WSL2 continues to use a VM.
More accurately, WSL2 starts using a VM, whereas WSL1 didn't. WSL2 runs the Linux kernel inside a VM. WSL1 runs Linux processes under the NT kernel (albeit as a special type of lightweight process called a picoprocess), with an emulation layer to translate Linux syscalls into NT kernel calls.
WSL was a translation layer between Linux and Windows, WSL2 uses Hyper-V (I believe with some special sauce to handle integration).
That doesn't make the performance problems of docker-for-mac any less nasty though.