Containerization has become a major trend in software development as an alternative or companion to virtualization. The basic idea of containerization is to package up software code with all of its dependencies so that you can bring it into any infrastructure and run it. By packaging up all decencies with to code itself, developers are able to deploy code into production environments without have to set up the environment themselves. Containers can be imagined as how shipping container are. Where a shipping container holds many different parts and objects, software containers hold an application along with its libraries, framework and other components it needs to run.
Docker is the company driving the container movement and is the only container platform to host any application across the hybrid cloud. Containers sit on the top of a host server and shares the kernel along with the host operating system. With containers instead of virtualizing the whole underlying computer like with virtual machines (VMs), only the operating system is virtualized. This is beneficial since sharing the operating system’s resources such as libraries reduces the need to reproduce redundant libraries and allows a server to run multiple workloads without having a separate operating system for each load. As a result of sharing libraries, containers are exceptionally lightweight, require substantially less storage than a traditional VM and are very fast with starting up. In practice with the lightweight aspect of containers, someone could run two to three times applications on a single server that they would have been able to if they used VMs instead. In addition to saving space, containers can also help create a portable development environment for testing and deployment.
There are two types of mainstream containers and they are Linux Containers (LXC) and Docker. LXC is a Linux operating system level of virtualization method for running multiple isolated Linux systems on a single host. Docker on the other hand could be seen as to have evolved from LXC, since it was started as a project to build single application LXC containers. As a result, it is more flexible and portable which it eventually led to having into its own container runtime environment.