如何在 Windows Server 2016 上 运行 Linux Docker 图片?

How to run Linux Docker images on Windows Server 2016?

我已经成功地将 docker 用于 windows 和 linux 容器 - 但现在我想使用一个新的闪亮 Windows 服务器2016 年完成这项任务 - 但如何?

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

安装正常 docker.msi 失败,因为 windows 版本不是 Windows 10。

不幸的是,在尝试 运行 任何 linux vm docker 时抛出错误:

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

在 docker 测试版中,我可以在使用 windows 容器或 linux 容器之间切换 - 但我如何在 Server 2016= 上做到这一点 没有托盘图标或其他。

更新答案
Windows 服务器(从版本 1709 开始)现在支持 Linux 容器。 更多信息请阅读:

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

旧答案

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

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

现在你必须 运行 Linux 容器 Windows 10.

有关详细信息,请阅读 Elton Stonema 撰写的这篇文章中的“2。您必须在容器内使用 Windows(暂时)”。 https://blog.sixeyed.com/windows-containers-and-docker-5-things-you-need-to-know/

还有关于 Stack Overflow 的类似问题。 Linux Docker container on Windows Server 2016

现在可以在 Windows Server 2016 上 运行 Linux 容器,尽管它不像 运行 将 Docker 安装到 Windows 安装程序。完整说明在以下答案中:Linux Docker container on Windows Server 2016