3

My understanding was that the primary limitation of running docker on other OSs was the Linux Network containers that made it possible. (Certainly for Macs).

Recently Microsoft announced a plan to provide a Linux kernel running natively packaged with Windows 10.

My question is: Can you run Docker natively on the new Windows 10 Linux kernel?

Note - this is not a duplicate of this question (which I also wrote) as that was about the Windows 10 bash userspace, and this is about the Windows 10 Linux kernel.

Hawkeye
  • 2,699
  • 9
  • 30
  • 35

1 Answers1

1

It's possible yes, it's one of the main "highlights" of Windows Subsystem for Linux 2. The main reason is that WSL 2 runs a Hyper-V container with the full Linux kernel, instead of just something that looks and feels like Linux like WSL 1 does.

https://devblogs.microsoft.com/commandline/announcing-wsl-2/

Stuggi
  • 3,506
  • 4
  • 19
  • 36
  • Could you elaborate more on by a Hyper-V container makes the linux networking possible? – Hawkeye May 07 '19 at 12:10
  • A Hyper-V container is something between a VM and a container, it runs it's own small copy of the chosen OS kernel, and as such behaves like a VM, and this is what enables networking. On the Windows side, it's basically like any other host running a Hyper-V VM with Linux in it. – Stuggi May 15 '19 at 05:31
  • So since it’s actually running the whole kernel, it runs docker natively, just as you can run docker on a Linux VM. There’s some other magic behind the Hyper-V containers, but for how it pertains to WSL and WSL2, that’s the gist of it. – Stuggi May 15 '19 at 09:36