Windows Container and Docker

Source: Internet
Author: User
Tags docker hub docker swarm

Windows Container and Docker

Microsoft officially released Windows Server 2016 at the Ignite technology conference in 2016, where container services are already available as a production environment. This means that the windows built-in container service has officially come into view, although we've already had Docker for Windows, but in this article we're not going to be talking about containers running on Windows Linux virtual machines. It is a native Windows container.

1. Windows Container provides 2 runtimes: Window Server contianer or Hyper-V Container

Windows provides 2 types of container runtime models. Windows Server Container is consistent with the familiar Linux Contianer container model, where containers share the kernel with the underlying operating system, so they are lightweight and run quickly. When you start a process in a container, the process actually runs on the host, and you can use Task Manager or PowerShell command get-process to get information about the process.

Hyper-V Contianer is a new container runtime model that launches a small virtual machine on a host, so the container will have its own independent operating system kernel. When you start a process in Hyper-V container, the host is not aware of the process. Hyper-V container provides better isolation, and the virtual machine is cut very small, so performance is still good. On Windows Server 2016, you can choose between 2 different runtimes, while the container service is available on Windows 10, but you can only run Hyper-V Contianer.

Regardless of the runtime, you can use the standard Docker command line, and the format of the container image is consistent with the Linux container image. This means that Windows Container can be distributed through the Docker hub, and your previous experience with Linux containers can also be inherited onto Windows containers.

2. Windows Container can only run Windows applications (at least for now)

Many friends have asked this question: Can I run a Linux application in the Windows Container service, or vice versa? Docker is great, but it's hot. You cannot run Linux processes directly on Windows, nor can you run Linux processes in Windows container. This is true for the 2 runtime mentioned above, regardless of which runtime model the underlying operating system is windows, so you cannot run the Linux process.

This also means that a large number of images above the current Docker hub cannot be used in Windows Container. Microsoft has started providing Windows container mirroring on the Docker hub, and you can use the same docker pull command or go to these images. For example: Microsoft/windowservercore image is a full server image (about 3G size), in this image you can use the standard MSI installation package, through Dockerfile to build your own image, you can install and run the full. Net The framework and other Windows applications. The microsoft/nanoserver image is a lite version of the operating system image (approximately 300M), does not provide MSI support, can only run. NET core applications, and it needs to be managed using PowerShell.

Although Microsoft has become more open in the last few years, Windows and Linux are still 2 completely different operating systems, and we see Bash for Windows and PowerShell on Linux, but the boundaries are still there. With information provided by Microsoft at the Ignite conference, it may be possible to provide support for running Linux container on Windows in the future through Hyper-V container, but it is not available for the time being.

3. Container Orchestration platform can support hybrid deployment of Windows and Linux server nodes

Swarm is a container orchestration platform provided by Docker, starting with version 1.12, any server node can join the Swarm cluster, the same applies to Windows Server. As a result, you can mix windows and Linux nodes in a single swarm cluster, although the corresponding containers can only be run on different operating system nodes, but they are all able to communicate through the Swarm network to build a complete application.

For microservices splitting, the ability to build distributed applications across platforms is attractive. If your application is now a traditional ASP. NET monomer application, you can use the Microsoft/windowservercore image to containerized the entire monolithic application, then gradually split some of these components, using microsoft/ Nanoserver. NET core to run these microservices components, you can even introduce nginx as your reverse proxy server and run it on a Linux server node.

The hybrid Docker swarm cluster provides you with a better microservices split path and provides a more flexible cross-platform choice during the split process, which is very appealing to any team.

4. The licensing method for Windows container will follow the operating system that is running

If you go to the Docker hub to view Microsoft's Windows Server Core and Nano server container images, you'll notice that the description has an authorization note (EULA). By following the instructions, the container will be licensed with the operating system that you are running, that is, depending on the version of the server you are using, such as datacenter or standard version.

I found it on Microsoft's official Windows Server 2016 Licensing white paper, which allows you to run an unlimited number of Hyper-V Container on Datacenter and 2 on the standard version, while for native windows The Server Container is infinite.

While most of the mirrors on the Docker hub are open source software, open source doesn't mean free. At the same time, Docker has started to provide commercial container image distribution services through the Docker Store, and these images are charged.

5. It's time to start exploring Windows Container.

Windows Server 2016 has been officially released, and the container service above Windows 10 has been available for a long time. Microsoft has been working very closely with Docker over the past few years, and the support API for Windows container in the current Docker tools is also stable. So if you're thinking about when to start containerized your Windows app, you can start now.

Leansoft and Microsoft China launched the "Udad DevOps training" in 2016 by the Community's great concern, we in Beijing, Shanghai and Shenzhen, respectively, to provide a number of training, participants more than thousands of people. Windows container has always been a subject of great interest to students, and in 2017 years we will be launching a number of new training content including Windows container. The initial training will commence in February, so please pay attention to our public number.

Windows Container and Docker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.