在Linux子系统中的Docker中运行.Net Core

实际上我想在Docker中使用.NET Core.

因此我从this post了解它为自己提供了最好的灵活性,我将安装“Docker For Windows”.意味着我最终可以将.Core应用程序部署到Windows或Linux容器的容器中.但是,Linux容器仍然是Hyper-V管理的Linux容器.

1)有没有办法在Windows 10 Creators Update中使用Windows子系统Linux(WSL)来执行此操作?似乎比Windows / Docker为我管理单独的Linux VM的开销更少?

最佳答案 不,
running Docker containers in WSL is not supported(链接我的):

The docker engine is not a supported scenario in the short term. I would suggest hitting our User Voice page and 07001 if you’re looking to run the docker engine.

The docker client however should be running in build 14342. I have been able to run the docker client and connect to a docker engine running in a VM.

至于why it’s not supported

WSL is a clean-room kernel reimplementation. So it can’t, for both technical and legal reasons, simply take the kernel components of Docker and “make it work”. They would need to reverse-engineer years of ongoing kernel development and reimplement it. (Or take some other nontrivial approach.)

点赞