WSL aware docker engine

now that Windows Server 2016 supports WSL (Windows Subsystem for Linux), would it be possible to run Linux containers on Windows without virtualization trough WSL?

Idea is that instead of a Linux container on Linux, the docker engine would start Windows Server Core docker container and passed the “Linux stuff” (shell commands, executions, …) to its WSL layer. The underlying OS for the engine would still be Windows, all the filesystem overlays would still use existing Windows architecture so this would not require overlayfs in WSL etc…

I would like to stress that I do not mean to run docker engine inside WSL, that does not seem possible in forseable future, since WSL does not have a full Linux kernel, just a shim over Windows kernel with less features.

I have now noticed that there is an similar idea already reported in WSL repo on GitHub, only that it does not suggest using a server core image as base, but to use existing WSL isolation:

1 Like

WSL is just for developing, it is not production ready and will never be. Therefore it will be a bad idea to use WSL in production. This does not mean, it is unreliable, but more like being for developing/testing only.

Also wsl is not a “shim”, all linux api calls are directly implemented in the windows kernel. You’re just not allowed to call those apis without being inside the wsl context, but that also would not make sense, as your application would not even have a userland (cause of missing context, which userland should windows use to execute your binary in? You can have OpenSuse/Alpine/Ubuntu/Kali on the same windows host). And that in turn is very unhelpful.