A container is an isolated, lightweight system for running an application or process on the host operating system. If you talk about containers, you should start with LXC always. Technically that was the first proper implementation of containers. This whole magical world of containers started from Linux Kernel feature which allowed to run processes that are isolated from the rest of the system. This technology and its power gained momentum when Docker and CoreOS came with useful and easy features. Now today Docker became de-facto standard for containers deployment and management and CoreOS for Container optimised Operating Systems. LXC was the tech behind both of them.
Linux Containers give you ability to run a completely system isolated process which has its own environment. When I say own environment, I meant process namespace, file share, network etc. In simple word virtualisation at kernel layer ! But its not exactly virtualisation. And the main reason why containers are famous because you can package it and share it. This tech has simplified whole development and deployment life-cycle and gave true power to DevOps.
Containers are build on top of the host operating system’s kernel so OS and Container both share same kernel. Any container who wants to access or use kernel’s feature, does not get everything on plate straightaway!
In these scenarios, usually container gets an isolated or virtualised view of kernel. That’s why, what-ever happens in Container goes away when it stops running.
In 2016, Microsoft worked with Docker to create a container engine implementing the Docker specification on windows . This allowed containers to run on windows servers as well. Windows offers two kind of isolation —
- Process Containers a traditional approach(also known as Windows Server Containers — WSC)
- Hyper-V Containers [each container runs inside of a highly optimized virtual machine]
Standard offering of Container Images from Microsoft
- Windows — contains the full set of Windows APIs and system services (minus server roles).
- Windows Server Core — a smaller image that contains a subset of the Windows Server APIs–namely the full .NET framework. It also includes most server roles, though sadly to few, not Fax Server.
- Nano Server — the smallest Windows Server image, with support for the .NET Core APIs and some server roles.
- Windows 10 IoT Core — a version of Windows used by hardware manufacturers for small Internet of Things devices that run ARM or x86/x64 processors.
Windows containers are not that much easy or useful till today as a use for container based deployment. Their image size is large which is not good, their dependency on host OS is also an issue. ex: In process isolation mode is that the Windows base image that is used for a Docker image must match the kernel of your Windows machine.
But still Microsoft is putting a lot of effort to handle containers. I expect a good outcome in coming days.
That’s all for this post. Thanks and Keep learning !