Introduction To Windows Container And Docker Terminology

Windows and docker terminology

Introduction to Windows Container and Docker Terminology

In this blog, we are sharing about windows container and docker terminology in windows 2016.

UNDERSTANDING THE USE CASE FOR CONTAINERS

windows container1

PHYSICAL SERVERS

In Earlier days, we use to deploy individual physical servers for each application that we need to support. So IT team will take a week to prepare the server. Typically there is a lot of unused physical resources.  As technology advance, virtualization software like VMware made easy to deploy virtual machines. It helps the business to more efficient use of hardware resources available. They can spin up a virtual machine within few minutes without any hassles.

VIRTUAL MACHINES

As the downside, each VM will have a full copy of OS files which leads to slow bootup. We need to take care of windows licensing, patching and maintenance of VM. On top of that, VM hard disk size is also too large and its hard to move between environments. Also, it needs more CPU and memory to run VM’s.

CONTAINERS

So many businesses had now turned to container technology to bypass the above limitations. Containers are the evolution of virtual machines. Containers do not require complete operating system. It actually shares the OS kernel on the host that running on. So it reduced tons of resources and also it eliminates licensing & patching operation system.

The main benefit about containers are it will boot up instantly and its smaller in size. This portability & stability are main reasons for containers to gain more popularity. Developers can build and test apps locally in their container(s) from their laptop. They can run the same container easily on physical servers, virtual machines and also in the cloud without any modification. So application environment will be identical no matter where the developer works on the application.

APPLICATION PROCESS IN VM

windows container2

In above diagram, the development process for ASP.NET application will take in an isolated environment. Once the developing process is complete, we move the application to a different environment for testing the application. If everything is good, we need to move the application to the production environment to make the application is available to the users. In this process, we are installing IIS & ASP.NET every time in separate VM’s which take lots of time & resources involved in this process. Also, we experience different issues as we move the application from one environment to another.

APPLICATION PROCESS IN CONTAINER

windows container3

In the container, we are packing our application and its dependencies into a container image and we can run that image in any environment. In above diagram, we install IIS with ASP.NET app and build a container image. Now we can run the same image in development, testing/staging & production environment. This is one of biggest benefit from this technology.

DOCKER INTRODUCTION

DOCKER is an open source project and Microsoft contributed and partnered with them to manage the windows containers as they did for Linux containers. So developers, administrators can use same tools and technologies that available in dockers for both Linux & Windows containers.

windows container4

 

VIRTUAL MACHINES Vs CONTAINERS

In above diagram on the left-hand side, we have virtual machines running on top of the hypervisor like VMware or hyper-V. On the right-hand side instead of the hypervisor, we have a new technology called DOCKER ENGINE. This engine can be run either in Linux or windows which help to run containers. One more component which we use is docker client to issue commands to containers to build images. Docker engine is communicating with docker client through API to execute the commands.

DOCKER RUN IN WINDOWS 2016

windows container5

To run the container we need windows 2016 host machine (Physical machine or VM) and native windows containers feature need to be installed in it. We referred it as Container Host. Then we need to install Docker Engine and run as a service on the container host. This helps to create and launch containers. Now we can start creating containers using windows 2016 server core and nano server.  There is no graphical interface for this containers. In order to manage the containers, we need to use the docker client tool docker.exe. When we issue a command through docker.exe it talks to docker engine through REST API.

windows container6

To create a new container first we need to select an OS image for your container either windows server core (or) nano server. As above example, we select windows server core as OS image then we install IIS on top of that image. Then we deploy ASP.NET application and we package it as customized container image. This image can be pushed to centralize repository and we can pull it on any other container host as desired. Also, we can launch the same container on the different server whenever required.

Thanks for reading this blog. We hope this will be useful for you to learn the basic container and docker concepts in windows 2016.

Loges