Introduction
Nowadays, being a software engineer requires awareness of at least some containerization, preferably at the application level, such as getting images, building an image, pushing an image, and running that image as a container.
I still remember building a Docker image and publishing it to Docker Hub or Azure Container Registry. Still, when it came to an interview, I struggled to explain the terminology deeply, such as what a container is and its advantages. It’s like cooking without truly understanding the ingredients you are using. I know an interview is a different ball game, which is why I created this to help us brush up on our terminology skills.
That’s why in this article, we’ll discuss what a container is, why it is essential, its advantages, etc.
What is a Container?
We can say that it is a technology that bundles the code for an application and the configuration required to run the code itself in one unit.
That’s why most of the time you’ll hear that it is lightweight, standalone, and executable, which includes everything to run, such as code, runtime libraries, and dependencies. However, it shares the host system’s operating system kernel rather than running its own Operating System (OS).
Think of it as a “to-go box” for your application, which contains the application and the necessary ingredients, so that it runs the same anywhere, whether on your machine, a server, or even in the cloud.
Why is a Container essential?
If we can share a lightweight container that includes everything needed to run, then it is easy to create a production-like environment, even on a developer’s laptop.
From a developer’s perspective, try to consider this: if we can containerize any application, we can also containerize databases.
Now, imagine who has ever had to install an MS SQL Server on a computer knows that this is not the easiest thing to do. Even if you are an expert, installation can still be time-consuming (and even sometimes you may encounter some gotchas) and require a lot of space on your laptop. You would not want to do that to your development laptop to test whether the application you developed works end-to-end.
With containers, we can efficiently run a full-blown relational database in a container.
Once we’ve completed testing, we can manage the container by stopping it. But remember, you still have the option to delete the container. As a result, the database will disappear and be compared to uninstallation.
A key reason container(s) are essential (especially nowadays) is that they allow operators (DevOps) to focus on their strengths – provisioning infrastructure and running and monitoring applications in production. When all applications that must run on a production system are containerized, operators (DevOps) can start to standardize their infrastructure.
Container Advantages
Reading books about containers, I have seen numerous advantages, but we will focus on four key benefits: portability, self-containment, rapid replication, and reduced resource usage.
Portability
It is a fact that containers bundle an application with its dependencies, ensuring it runs consistently across different environments – again, from a developer’s laptop to a cloud server – without compatibility issues.
Self-Containment
Each container operates in isolation (but please don’t isolate yourself too), holding everything the application needs, such as libraries, runtime, configuration, etc., which prevents conflicts between applications and makes troubleshooting easier.
Rapid Replications
In the context of orchestration like Kubernetes, containers can be created and destroyed in seconds, enabling teams to quickly spin up multiple identical instances for scaling, testing, or recovery purposes.
If you are interested, I suggest you explore the world of Kubernetes.
Reduced Resource Usage
As we have mentioned, the container shares the host system’s operating system kernel, which containers consume far less memory and processing power compared to a VM, resulting in higher efficiencies and lower infrastructure costs.
Container vs Virtual Machine
In most tutorials, you’ll see this when you are starting with Docker or any containerization technology.
It is essential to understand the difference, though, so let’s try to see the difference.
A Virtual Machine (VM) virtualizes the whole hardware stack, running its full operating system on top, let’s say a Hypervisor, and making it heavier but isolated. A container shares the host OS kernel and isolates only the application and its dependencies, making it lightweight, faster to start, and resource efficient.
Container Image
A container image is a read-only package that provides all the essential components to run an application.
It serves as a template for container engines to start a container.
The image contains software requirements such as code, runtime, libraries, and system tools, created from instructions specified in a file (Dockerfile).
Container Registry
A centralized repository that stores container images, which can be made available to the public or private for authorized individuals or service accounts. It acts as a distribution mechanism, allowing users to push and pull images to and from the registry.
Docker Hub
Docker is popular in the world of containerization. Docker Hub is a public cloud service owned by Docker, Inc., available to anyone with an account.
It is designed to have both public and private repositories; public repos are free, while private repos require a plan after a specific limit.
Lastly, it would work well with different cloud providers and platforms such as Azure, Google, AWS, Kubernetes, etc.
Azure Container Registry
If you are an Azure guy like me, as we all know, Microsoft owns it.
It is designed to have a private registry inside your Azure subscription, which is a fully managed service integrated into the Azure ecosystem.
Lastly, it is deeply integrated with Azure services like Azure Kubernetes Service, Azure App Service, Azure Functions, Azure DevOps, etc.
Summary
You are now in this section. As you can see, we have introduced the fundamentals of containerization.
We highlighted the importance of containers, their advantages, and defined key concepts such as images and container registries, comparing VMs and containers.
A key takeaway is that containers are lightweight, standalone, and include all necessary dependencies, sharing the host OS kernel for efficiency.
Once again, I hope you have enjoyed this article as I have enjoyed writing it.
Stay tuned for more. Until next time, happy programming!
Please don’t forget to bookmark, share, like, subscribe, and comment.
Cheers! And thank you!
If you’re ready to go a step further, I’ve added a short video below that demonstrates basic Docker commands like: docker version, docker pull, docker run, and docker rm.
This will help you bridge the gap between understanding containers and actually working with them.





Leave a comment