16

我已经成功地在 Windows 10 上使用 docker for windows 和 linux 容器 - 但现在我想使用新的闪亮的 Windows Server 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 beta 中,我可以在使用 windows 容器或 linux 容器之间切换 - 但我如何在 Server 2016 上做到这一点= 没有托盘图标或其他。

4

2 回答 2

8

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

于 2017-03-23T15:58:58.403 回答
4

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

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

旧答案

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

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

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

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

还有一个关于 Stack Overflow 的类似问题。 Windows Server 2016 上的 Linux Docker 容器

于 2017-01-17T21:00:58.290 回答