
Before containerization, applications were deployed using physical servers or virtual machines (VMs).
Physical servers scaling required buying more physical servers, which was expensive and slow without forgetting that it caused conflicts between applications. VMs improved this by isolating apps with their own operating systems, but there was lot of resource waste, that’s because each VM needed its own OS, even if they were running the same app, and also these apps worked on one server but failed on another due to different setups. Containers revolutionized this by being lightweight, sharing the host OS, and ensuring fast, consistent deployments.
To understand what containerization is let me give you a small example, Imagine you sell coffee (your app) worldwide. Without Containers, you will need to ship the beans, cups, and a coffee machine to every location, hoping they prepare it the same way. With Containers, you prepare the coffee in a sealed cup (container) and ship it. Every customer gets the exact same coffee, ready to drink, no matter where they are ( I apologize for those who hate cold coffee for this illustration).
In short?
A container is a lightweight, standalone, and executable software package that includes everything needed to run an application:
- Code
- Runtime
- Libraries
- Environment Variables
- System Tools
“Docker is changing the way applications are built, shipped, and run. It’s the next step in the evolution of virtualization.” - Solomon Hykes, founder of Docker
Containers share the host operating system’s kernel which give us more efficiency and speed compared to traditional VMs. These containers can run consistently across different environments, making them ideal for modern software development and deployment.
Docker is the most popular platform for containerization, providing tools and an ecosystem to create, manage, and deploy containers. Core Docker concepts? How does Docker work and it’s benefits? I will make sure to answer these question in another article but for now just remember that containers ensure your app works the same everywhere, like delivering ready-made coffee instead of sending raw ingredients.