eBooks/eGuides

Containers for Dummies

Issue link: https://insights.oneneck.com/i/1293607

Contents of this Issue

Navigation

Page 35 of 76

32 Containers For Dummies, HPE and Docker Special Edition These materials are © 2017 John Wiley & Sons, Inc. Any dissemination, distribution, or unauthorized use is strictly prohibited. Linux and Windows take fundamentally different approaches to kernel design. As such, Docker on Windows doesn't have direct support for things like Linux namespaces and cgroups, which are integral to Docker and which are built into the Linux kernel. To address this, Windows Server 2016 adds what Microsoft calls the host compute service. The host compute service replicates this functionality and acts as an API that can be used by the Docker Engine. Let's turn attention to workload portability between Linux and Windows. There is a lot of confusion around whether you can take any Linux-based Docker container and run it on Windows. Is this supported? The answer, unfortunately, is: It depends. Prior to Docker support being added to Windows Server 2016, Docker Linux containers ran on Windows thanks to the Virtual- Box hypervisor, although this functionality wasn't ever intended to run containers in production. All the containers that appeared to be running on the Windows host were, in fact, running in a vir- tual machine that used Linux as the OS. As such, Linux containers worked spectacularly. However, it was really aimed at developer desktops, not production. And with Windows Server 2016, Virtu- alBox is out of the picture, as is the use of a virtual machine run- ning Linux to support Docker. In fact, with Windows Server 2016, you don't need virtual machines at all to make Docker work its magic. As of Windows Server 2016, Microsoft has added native container support. But there are a few things you should understand. Most important: Your Linux-based containers won't run on Windows. (You know that we're serious about that since we put it in italics.) You can't just pick up your Linux containers and drag them over to Windows. You need to re-create new Windows-based images starting with new Dockerfiles. Second, even if you were testing containers on older versions of Windows, you can't bring those to your native Windows Server 2016 environment. The reason is Linux. Under the hood, a pre–Windows Server 2016 container deployment was actually running in a Linux VM on VirtualBox. And because you can't sim- ply bring Linux containers to native Docker on Windows Server 2016, you may need to restart your container journey.

Articles in this issue

Archives of this issue

view archives of eBooks/eGuides - Containers for Dummies