File: engine/faq.md, CC @mstanleyjones
This FAQs page states under "Does Docker run on Linux, macOS, or Windows? "that:
_The Docker Engine client runs natively on ... Windows. By default, these clients ... provide the required features to run Linux-based containers within ... Windows, or Windows-based containers on Windows_.
It this 100% correct? Is it 100% clear?
What does the "_or_" imply? That we can run either Linux based containers OR Windows-based-containers on Windows? Perhaps it should be an "_and_"?
Specifically, the problem we have come across relates to running Linux-based containers on Windows Server 2016.
Our experience suggests that while these containers run very successfully on Windows-10, on Windows Server 2016 this is at best, not straightforward ... an indication to this effect (assuming you agree that it is true?) and a link to recommended approaches would be very valuable.
In summary, there seems to be a significant difference between the implementation of "Docker for Windows" on Windows-10 and Windows Server 2016 that I think is not reflected in the FAQs as they stand, and that could be usefully added.
Regards,
Nick Bateman
Hi Nick! Thanks for filing this. We got your email too. :) Thanks for the feedback, let's see what we can do.
With the specific FAQ you refer to first, we are trying to differentiate between Linux-kernel containers running on Windows and Windows-kernel containers running on Windows.
@nickobat Please review the PR #4283
Hi Nick, thank you for the feedback. The situation does have a bit of complexity. On Windows 10, when you run Docker for Windows, you have the option of running Windows containers or Linux containers. In the system tray, right-click the Docker icon and select Switch to Windows/Linux containers. If you pick Linux containers, under the hood, Windows spins up a MobyLinuxVM, which you can see by using Hyper-V. Windows containers don't require a VM.
On Windows Server 2016, I believe it's the case that only Windows native containers are supported. When you install Docker, you get the engine and the command-line client, which are a native Windows service and an application. A lot of the setup is left as an exercise for the user, e.g., opening ports 2376 and 12376 in the firewall.
@JimGalasyn @nickobat this is all in the docs already, and I added links from the FAQ to the relevant topics (in the referenced PR ^^). Specifically:
Those topics also link out to blog posts and Microsoft docs.
Hi @JimGalasyn and thanks for the info.
I think my biggest area of confusion resulted from the wide use of the term "Docker for Windows" without anywhere really saying just how different the implementations for Windows10 and WindowsServer2016 actually are ... i.e. exactly as you describe above.
I think my FAQ would therefore be: "How can I run Linux-containers on Windows Server 2016?"
If the answer is actually "You can't, only on Windows 10", then that answer needs to be stated even more clearly ... but is that really the answer?
@friism ^^
@nickobat you can run both Windows and Linux containers on both Windows Server 2016 and Windows 10. If this isn't already clear from the links I've given you, we will be reworking those docs to make it clear.
As pointed out by @londoncalling I think this is pretty clear:
The Docker for Windows is designed to configure Docker development environments on Windows 10 and on Windows Server 2016. You can develop both Docker Linux containers and Docker Windows containers with Docker for Windows. To run Docker Windows containers in production, see instructions for installing Docker EE on Windows Server 2016. To run Docker Linux containers in production, see instructions for installing Docker on Linux.
So yes, you _can_ build and run Docker Linux containers on Windows Server 2016 by installing Docker for Windows on Windows Server 2016. This facility was added because some developers like to use Windows Server 2016 as their desktop OS. You _should not_ use Docker for Windows installed on Windows Server 2016 for running Docker Linux containers in production, however. Docker for Windows was not built for that and Docker for Windows is not supported for running Linux containers in production.
Microsoft and Docker are working on this, so stay tuned: https://redmondmag.com/articles/2017/04/20/windows-server-2016-getting-linux-containers.aspx
@friism .. "You should not use Docker for Windows installed on Windows Server 2016 for running Docker Linux containers in production"
... so that is the answer that perhaps could be included in the "What does it run on?" FAQ:
Regarding "Docker for Windows is not supported for running Linux containers in production"?, if it works (and it does on Windows-10) what exactly is "not supported"?
Either way, the redmondmag link offers hope; do you have any indication of timescales?
Finally, just to say that this has in no way been a theoretical discussion (in case you wondered!). The company I work for developed a project support application using Docker and Linux containers, that I now need to implement at a client I am working at, but the only server I have available on which to deploy it is Windows Server 2016, which we initially assumed would be sufficient, as I already had it running successfully on my Windows-10 laptop.
Thanks for your input ... I guess the feed back I gave in my original post must make a bit more sense now, and the time you have spent responding to me is appreciated, as is the your work of you all in general.
"Not supported" means that we won't lead you to believe that it will work, and you're not likely to get much help if you run into trouble with it. That's important to lots of companies running things in production.
Most helpful comment
Hi @JimGalasyn and thanks for the info.
I think my biggest area of confusion resulted from the wide use of the term "Docker for Windows" without anywhere really saying just how different the implementations for Windows10 and WindowsServer2016 actually are ... i.e. exactly as you describe above.
I think my FAQ would therefore be: "How can I run Linux-containers on Windows Server 2016?"
If the answer is actually "You can't, only on Windows 10", then that answer needs to be stated even more clearly ... but is that really the answer?