Introduction to Containerization and Getting Started with Docker

Introduction to Containerization and Getting Started with Docker

Why Was This Tool Created?

Before diving into Docker itself, it's important to understand why developers created it in the first place. Like any great tool, Docker solves specific problems. Have you ever worked on a project where everything worked on your machine, but failed on someone else's? Docker solves this problem. Over time, developers and organizations faced several challenges in software deployment and infrastructure management. Some of the key issues that led them to create Docker include:

  • Operating System Differences
  • Dependency and Environment Issues
  • Resource Overhead with Virtual Machines
  • Deployment Challenges

To solve this problem, developers introduced the concept of containerization. Containerization packages an app along with everything it needs to function. This entire package becomes a container, and it acts as a standalone unit. Unlike virtual machines, containers share the host system's operating system, which makes them more efficient and faster to start. You can run these containers anywhere—whether it's a laptop or a cloud server—without compatibility issues. Developers use tools like Docker, Podman, CRI-O, RKT, OpenVZ, and LXC to create containers. However, in this series of articles, we will focus only on Docker.

What is Virtual Machine

Before diving into the differences, let’s first understand virtual machines. A virtual machine (VM) works like a computer inside our computer; it functions as a fully operating real computer with a virtual CPU, memory, and hard drives. The host computer runs a software layer called a hypervisor. It creates and manages these virtual environments. VMs let us run a different operating system or test programs without affecting our main computers.

What is the difference between Containers and Virtual Machines

As mentioned earlier, we discuss Docker in this series because it is one of the popular containerization tools.

What is Docker?

Docker is an open-source platform for developing, deploying, and running applications using lightweight portable software containers. These containers act as standalone and executable software units that include everything needed to run.

Let's break this down to avoid diving too deep into technical details. Think of it like organizing a party. You make a list of items like food, drinks, plates and cups, music, and decorations. You planned to host the party at a small private hotel, but the hotel suddenly informed you that the place was reserved for another party. So you decided to celebrate the party at the office instead. Instead of buying everything again, you hired a catering service. They brought everything needed to start the party. Docker works the same way as the catering service. When you tell it what you need, it packs and delivers it all. In Docker, developers pack the app and everything it needs into a container. Whether you run it on a personal laptop, office laptop, or even a cloud service, the app runs without extra setup.

Docker Architecture


Docker follows a client-server architecture where different components work together to create, manage, and run containers. which include followings,

  • Docker Daemon
  • Docker Client
  • Docker Registry
  • Docker Objects

Don't worry about the code segments or words I've used here. If you're not familiar with them, that's totally fine. We'll discuss everything in detail in the upcoming articles.

Docker Daemon

The Docker Daemon (dockerd) serves as the heart of Docker. It runs as a background service on our machines. It handles all container-related actions such as building, running, and managing containers. When the Docker Client sends commands, the Daemon processes them, creates or stops containers, and manages Docker objects. It acts as the engine that keeps everything running smoothly.

Docker Client

The Docker Client is the part of Docker that we directly interact with. It’s a command-line tool where you type commands like docker run, docker pull, or docker build. These commands go to the Docker Daemon, which does the heavy lifting. The client and daemon can run on the same machine, or you can use the client to communicate with a remote daemon.

Docker Registry

Docker images live in a registry. Docker Hub is the most well-known public registry where many images are available for public use. You can also create your own private registry to store organization-specific images like Amazon Elastic Container Registry (ECR), Google Container Registry (GCR), or Azure Container Registry. When you run a docker pull command, the client contacts the registry to download the image. And when you use docker push, you upload your custom images to a registry.

Docker Objects

Docker objects are the core components we use when developing, shipping, and running our applications in containers. Among these objects, images and containers are the most essential ones to understand. Let's talk about Docker Images and Containers.

  • Images act as blueprints for our applications. They are read-only templates that contain everything needed for an app to run, such as the code, runtime, libraries, environment variables, and configurations. We build these images from a Dockerfile, which is a set of instructions outlining how to create the image. Once we build them, we can share, version, and reuse them across different environments, making them super handy for collaboration and consistency.
  • Containers bring our applications to life. They run as instances of these images and provide isolated environments for our apps. Each container operates independently from the others and from the host system. This isolation ensures consistent behavior across environments—whether on a local machine, a test server, or in production. You can easily start, stop, delete, or move containers whenever needed.

What Can Be Done with Docker?

Before diving deeper into Docker, let's get a quick overview of the things you can do with it in the real world:

  • Run a local development environment for web applications (e.g., Node.js, Python, Ruby on Rails)
  • Host databases like MySQL, PostgreSQL, or MongoDB in isolated containers
  • Build and deploy microservices architectures
  • Create scalable APIs for cloud-native applications
  • Run CI/CD pipelines for automated testing and deployment
  • Migrate legacy applications to modern infrastructure

Now, let's move on to the installation process. You can use the following links to download and set up Docker Desktop:

  1. Download Docker Desktop Application https://www.docker.com/products/docker-desktop/
  2. Get Started with Docker https://docs.docker.com/get-started/get-docker/
P Vishmika
Trainee DevOps Engineer
"CODIMITE" Would Like To Send You Notifications
Our notifications keep you updated with the latest articles and news. Would you like to receive these notifications and stay connected ?
Not Now
Yes Please