DevOps 01: Introduction to Containers

DevOps 01: Introduction to Containers

When we talk about DevOps, it is often thought of as a "package" that consists of tools and frameworks that make up the DevOps ecosystem. Unfortunately, this notion is extremely far away from the truth. DevOps is not just about automation or using tools that enable continuous deployment and frequent releases, but it's about a change in culture that facilitates frequent product releases in an efficient manner.

Containerisation is one of the processes which makes deploying applications easy and faster. We can deploy our application using containers without worrying too much about the memory and the storage that would be required to run the applications.

Want to know how? Let us understand what are containers and how they work to make our lives easier.

First: A brief history

Containers.png

If you refer to the above image, you can see the virtualization/use of virtual machines was one of the most effective ways to run multiple guest operating systems on the same machine. There was a significant drawback of this - each guest operating system needed its own share of memory and storage from the Host Operating System irrespective of whether it would consume that much or not.

This is where containers came into the picture. You can see in the reference image that Docker - an application that can run containers is installed on top of the Host Operating System. This docker application can be used to run multiple containers with applications inside these containers which occupy the storage and memory required by that application and when the container is shut down, the resources and returned back to the host.

So, what is a container?

A container is an executable unit of software in which application code is packaged, along with its libraries and dependencies in such a way that it can be run anywhere, everywhere - on a desktop, on-premises, or in the cloud.

Three points to remember about containers:

  1. Containers and small and fast because they do not need to include an OS. They can leverage the features of the host operating system.
  2. Containers help us standardize the way we package and ship software.
  3. Since containers carry all the dependencies with them, they are portable in nature i.e. they can be deployed anywhere.

What are the benefits of running a container?

Containers are very lightweight and therefore depending on your application size, they can start very quickly as compared to virtual machines. They comfortably fit in the DevOps lifecycle as deploying and testing applications becomes extremely easy using containers. Containers are also considered a great option for microservices architecture where each of the microservices can be deployed as an individual container.

I am sure you might have heard of terminologies like Docker, Kubernetes, etc. when it comes to containers and we will learn about them in the upcoming blogs. But what you must understand is that these words are not synonyms for containers.

The definition of docker as stated by docker.com : "Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers."

Docker is popularly being used both in smaller startups and well-established organizations. In the upcoming blogs, we will dive deeper into Docker and learn how to work with it.