A Beginner’s Guide to Containerization and Docker’s Core Concepts


Containerization has become the standard for modern software development cycle and delivery where agile delivery methods are required to keep up with the demand and pace of requirements and needs. Delivery time is not only the advantage that containerization offers but uniformity of code & packaging of software with all of its dependencies, environment & configuration has resolved the developers “works on my machine” dilemma. Containers have become the building blocks of micro services architecture on which all the modern applications are based and deployed in the cloud.

Docker has become the de facto standard to build & share containerized applications from development environments to cloud making containers ubiquitous. Although Kubernetes latest version have removed support for Docker container runtime but still docker remains favorite for collaboration, packaging and image distribution for developers. This post encapsulates the brief coverage of Docker’s concepts, components, images, containers, and Docker Hub. It emphasizes the transformative nature of Docker and appeals to beginners who are embarking on a journey to explore containerization and images.

Docker architecture and components

Docker architecture and components


Docker file and docker compose

A docker file is a set of instructions in a text file which is used to define an image and pass runtime values, configurations & instructions (RUN, COPY etc.) to the container during initializing it. It is done on a single isolated environment.

Docker compose is a tool that defines a YAML file for multi-container based applications that defines the volumes, services, networks and configurations. This makes the workflow of your application that is based on multiple containers to initialize, run and manage the lifecycle of with a single command (docker-compose up, docker-compose down).

Docker Images

As stated above the docker file is built into an image which acts as a set of instructions and blueprint for creating docker containers. It is an executable package with all the dependencies, libraries, runtime and code required to run the container.

Docker client

The Docker client/Docker CLI is a command line tool available for various operating systems (Linux, macOS, Windows) and is a crucial tool for developers, system administrators, and DevOps teams that allows them to interact with the Docker daemon.

Docker daemon/Engine and containerd

Docker daemon/engine used interchangeably is the core component of the Docker platform responsible for management of containers, images, networking, storage, security and isolation. Containerd, on the other hand, is an open-source container runtime officially a graduated project within the Cloud Native Computing Foundation. Containerd executes containers based on OCI (Open Container Initiative) specifications, ensuring compatibility and interoperability with other container runtimes and tools. Containerd executes containers based on OCI (Open Container Initiative) specifications, ensuring compatibility and interoperability with other container runtimes and tools.

Docker hub & registry

A Docker registry is a central repository that stores Docker images. It serves as a distribution hub where users can publish, share, and pull Docker images for use in their environments.
Docker Hub is the default public Docker registry provided by Docker. It hosts a vast collection of pre-built Docker images contributed by the community and official repositories for popular software and services. Docker Hub allows users to search for, pull, and push Docker images.

However, organizations can setup their private registries to store and manage their sensitive and proprietary images. Apart from Docker Hub, there are other third-party Docker registries available, such as Amazon Elastic Container Registry (ECR), Google Container Registry (GCR), and Azure Container Registry (ACR).

Docker desktop

Docker Desktop is an application for Linux, Windows and MacOS that provides an easy-to-use and streamlined experience for developers to build, test, and deploy containerized applications on their local machines. It abstracts away the complexities of setting up and configuring Docker components individually, providing a unified and integrated experience for containerized application development and testing.

The docker desktop includes all the components (Docker engine, CLI, container management, docker swarm, building images, networking, storage and resource management) on the developer’s computer.

Conclusion:

Docker has revolutionized software development by simplifying the creation, distribution, and deployment of containerized applications. It offers unparalleled benefits, including faster development cycles, collaboration, scalability, and compatibility across different environments. By embracing Docker’s concepts, components, and tools like Dockerfile, Docker Compose, and Docker Hub, developers can enhance their workflow and unlock the true potential of containerization in today’s fast-paced software industry.

Leave a comment