如何在Windows Server 2016上运行Linux Docker镜像?

问题描述:

我已经成功地在Windows 10上使用docker for windows与linux容器 - 但现在我想为该任务使用新的闪亮的Windows Server 2016 - 但是如何?如何在Windows Server 2016上运行Linux Docker镜像?

我已经安装使用本指南泊坞窗功能:https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server

安装,因为Windows版本IST而不是Windows 10

不幸的是,试图运行时,任何Linux VM泊坞窗抛出正常docker.msi失败错误:

image operating system "linux" cannot be used on this platform. 

在泊坞窗公测,我可以使用窗口的容器或Linux容器之间切换 - 但我怎么能做到这一点服务器2016上=没有托盘图标或其他人。

+0

你看看:[我可以混合基于Linux和基于Windows的容器在相同的码头引擎主机?](http://stackoverflow.com/questions/41010604/can -i - 混合 - 基于Linux和窗口为基础的容器功能于同搬运工发动机主机)? – abronan

+0

@abronan我知道混合是不可能的atm。我不想这样做。我想在WS 2016下运行linux容器。 这可能在W10上 - 那里的docker容器运行在一个小VM中。然后,您可以在此VM和运行本机Windows容器之间切换。但我无法弄清楚如何配置在WS 2016 –

+1

我也在寻找这个,希望有一个PowerShell命令,可以使交换机(我无法安装GUI版本的Docker)。 – Andrei

现在可以在Windows Server 2016上运行Linux容器,虽然它不像运行Docker for Windows安装程序那么简单。完整的说明是在以下答案:Linux Docker container on Windows Server 2016

最后回答
Windows Server(从版本1709开始)现在支持Linux容器。 欲了解更多信息,请阅读:

https://blog.docker.com/2017/09/docker-windows-server-1709/

老答案

遗憾的是,截至目前(2017年一月),我不认为这是可能的。

Windows Server 2016具有本机容器支持。这些容器使用Windows内核,因此只能运行Windows进程。要运行Linux容器,您需要MobyLinux虚拟机。

现在你必须在Windows 10

运行Linux容器欲了解更多信息,请阅读“2.你必须使用Windows的容器内(现在)”从这篇文章由埃尔顿Stonema。 https://blog.sixeyed.com/windows-containers-and-docker-5-things-you-need-to-know/

和Stack Overflow的类似问题。 Linux Docker container on Windows Server 2016

+0

这不是问题。我想使用Linux VM,但是不能在Januar中安装Tools。他们现在吗? –

+0

@ChristianSauer,仍然不支持linux容器本地支持,但有一些解决方法可以安装这些工具。看到Boggins的回答。 – Paul

+0

我不推荐在Windows Server上使用Moby VM进行生产。由于您不再直接在Windows主机上运行,​​因此可能会出现性能问题。 – Paul