This is part 2 in the Containers 101 series. In part 1 we discussed virtualization, and in this post we'll delve into containerization, which is a form of virtualization.
What Is Containerization?
Containerization is the bundling or packaging together of software code along with everything that code needs to run such as the runtime engine, libraries, configuration files, frameworks, and other dependencies. All of these components are condensed into a single, isolated, and portable "container," which runs on top of an operating system.
Packaging an application like this makes it easy to run the app in any kind of environment. It can be moved and run consistently in any kind of environment and on any infrastructure such as on bare metal, or inside virtual machines, independent of that environment or infrastructure’s operating system. Containerization takes away a lot of the complexity of installing and configuring an app.
Benefits of Containers
Unlike a virtual machine, a container relies on the operating system of the host, making it relatively "lightweight". This reduces the memory and storage needed by the container, making it possible to run multiple containers on the same infrastructure.
Since it has no need to boot up its own operating system, a containerized app can be started almost instantly, way much faster than a virtual machine. You can also tear it down just as quickly when it is no longer needed.
Containers are portable, meaning each container has been abstracted from the host operating system and will run the same in any location.
With containerization comes the advantage of fault isolation for applications. If one container fails, the other containers that are running on the same operating system kernel are not affected.
You can use container orchestration systems such as Kubernetes to automate the provisioning and deployment of containers.
The next post in this series will explore the differences between virtual machines and containers.