How to run Linux Docker images on Windows Server 2

2020-02-23 08:43发布

I have used docker for windows with linux containers on windows 10 sucessfully - but now I want to use a new shiny Windows Server 2016 for that task - but how?

I have installed the docker features using this guide: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server

Installing the normal docker.msi fails because the windows version ist not Windows 10.

Unfortunately, when trying to run any linux vm docker throws the error:

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

In the docker beta I could switch between using windows containers or linux containers - but how I can do that on Server 2016= There is no tray icon or else.

2条回答
我命由我不由天
2楼-- · 2020-02-23 09:09

Updated answer
Windows Server (from version 1709) now supports Linux Containers. For more information read:

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

Old answer

Unfortunately, as of now (January 2017) I don't think it is possible.

Windows Server 2016 has native container support. These containers use the Windows kernel so it is only possible to run Windows processes. To run Linux containers you would need the MobyLinux VM.

For now you have to run Linux containers on Windows 10.

For more information read "2. You have to use Windows inside the containers (for now)" from this article by Elton Stonema. https://blog.sixeyed.com/windows-containers-and-docker-5-things-you-need-to-know/

And a similar question on Stack Overflow. Linux Docker container on Windows Server 2016

查看更多
仙女界的扛把子
3楼-- · 2020-02-23 09:10

It is now possible to run Linux containers on Windows Server 2016 although it's not as simple as running the Docker for Windows installer. Full instructions are in the following answer: Linux Docker container on Windows Server 2016

查看更多
登录 后发表回答