What is a Container?

Container KB ID 0001793


Google containers and the net is full of people with whiteboards talking at a very low level about containers. They also appear to be largely developer and dev ops related, (which is understandable), but if you simply want to understand the concept of what a container is, then that’s a lot of YouTube watching to pick out some basic concepts. Particularly if you’re an IT pro, Engineer, or a Solutions architect.

Simple Container

Before we look at containers, let’s look at a concept we have had for about fifteen years now. The Virtual Machine; 

VM Model

Here we use a Hypervisor (Type 1: e.g vSphere, NSX, or Hyper-V, or Type 2 e.g. Parallels, Fusion, VMware Workstation, or Virtual Box etc). To create a virtual machine, the virtual machine runs its own Operating System, and you can install your applications on that operating system. The whole thing runs on the Hypervisor and, (for the most part), the machine does not even know it’s virtualised.

A Hypervisor allows a “Bunch of files” to behave like a physical machine.

A container is slightly different, where a hypervisors job is to separate the Machine from the Hardware, by supplying it with a set of virtualised hardware, so it (the virtual machine) thinks it’s running on hardware. The container ‘engine’ (in this case Docker), separates the Applications from the Operating Systems, by supplying a set of operating system processes, so that the applications think they’re running on an operating system. 

Docker Model container

A containerisation tool allows a portable file to behave like an application.

The above diagram is simply to illustrate the point, what is actually happening is, in the Operating system the Docker Engine, puts all the applications into their own CONTAINERS, and supplies each container, with all the processes and OS elements the application needs to run. Each container runs completely separately from all the others, and can be started and stopped independently, so a better representation of what happening is this;

Docker Model 2

Thats pretty much it! What you will find though, is a lot of people have their containers running in a virtual machine that’s running on a Hypervisor. Some people will recoil in horror, and say that’s  NOT what you should be doing, (unless they work for VMware of course). That scenario looks a little more like this;

Docker Model 2 container virtualised

Related Articles, References, Credits, or External Links


Author: PeteLong

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *