3.1 Docker Engine
Docker Engine is the "engine" of Docker, meaning the main software that makes containers work. This engine provides a platform for developing, delivering, and running apps in isolated containers. Docker Engine includes a few key components that enable the full functionality of Docker.
Docker Engine has three main parts:
- Docker Daemon: server process. It does the core container operations.
- Docker API: an interface that lets you interact with the Docker Daemon through programmatic calls.
- Docker CLI: command-line interface — a way to work with Docker from the terminal.
Role of Docker Engine:
Docker Engine manages the lifecycle of containers, from creation and starting to deletion. It ensures container isolation, so you can run multiple containers on one host without conflicts. Docker Engine makes it possible to run complex apps and microservices in containers, simplifying their development, testing, and deployment
.
Evolution of Docker Engine
Since its launch, Docker Engine has gone through many versions and improvements. Each update brought new features and performance enhancements. For example, container orchestration tools like Docker Swarm were added, allowing you to manage container clusters and automate app deployment.
3.2 Docker Daemon
Docker Daemon — it's the main server process that handles all Docker operations. It runs in the background and is responsible for managing containers, images, networks, and other Docker resources.
Functions of Docker Daemon:
- Creating and managing containers: Docker Daemon processes requests to create, start, stop, and delete containers. It ensures container isolation and distributes resources among them.
- Working with images: Docker Daemon downloads and stores container images that are used to create containers. It also manages the image cache to optimize disk space usage.
- Network management: Docker Daemon creates and manages Docker networks, which allow containers to interact with each other and external systems. It supports different network drivers and settings to ensure flexibility and security.
- Storage management: Docker Daemon manages volumes and other types of storage used by containers for data storage. It provides reliable and efficient data management inside containers.
Architecture of Docker Daemon
Docker Daemon uses a client-server architecture. The CLI or API client sends commands to Docker Daemon, which processes and executes them. The daemon runs on various operating systems: Linux, MacOS, or Windows.
Role in security:
Docker Daemon plays a key role in ensuring container security. It manages access rights, network settings, and container isolation to mitigate potential threats and vulnerabilities. Using namespaces (a process and resource isolation technology) and cgroups (a resource management mechanism), Docker Daemon isolates processes and controls resource usage by containers, ensuring their secure operation.
3.3 Docker API
Docker API is a programming interface that allows developers and system administrators to manage Docker using code. It works on the RESTful (Representational State Transfer) principle—an architectural style where interactions happen through standard HTTP requests, such as GET, POST, and DELETE. This makes it easy to automate tasks related to containers and integrate Docker with other systems and tools.
Functions of Docker API:
- Container Management: Docker API enables you to create, run, stop, and delete containers, as well as retrieve information about their status and logs.
- Working with Images: With the API, you can download, create, delete, and manage container images.
- Network Operations: The API supports creating and managing Docker networks, including connecting and disconnecting containers from networks.
- Storage Management: The API provides functions for managing volumes and other types of storage used by containers to store data.
Using Docker API:
Docker API can be utilized with various programming languages and automation tools such as Python, Go, Java, and others. This allows you to create scripts and applications to automate processes for developing, testing, and deploying containerized applications.
Examples of using Docker API:
- CI/CD: Automating the continuous integration and deployment process, where every change in the code automatically creates a new container and tests it.
- Monitoring and Logging: Integration with monitoring and logging systems to track container states and analyze their performance.
- Orchestration: Managing container clusters with tools like Docker Swarm or Kubernetes, using Docker API to interact with individual nodes and containers.
3.4 Docker CLI
Docker CLI (Command Line Interface) is the command line interface that lets users interact with the Docker Daemon and perform various operations with containers. Docker CLI provides a handy and intuitive way to manage Docker through the terminal.
Main Docker CLI Commands:
Docker CLI supports a wide range of commands that allow performing all the core operations with containers, images, networks, and storage. Some of these commands include:
- docker run: launching a new container from an image.
- docker build: creating a new image from a Dockerfile.
- docker pull: pulling an image from Docker Hub or another registry.
- docker push: pushing a local image to a registry.
- docker ps: viewing the list of running containers.
- docker stop: stopping a running container.
- docker rm: removing a stopped container.
- docker network: managing Docker networks.
Docker CLI Features:
- Ease of use: Docker CLI is designed to be intuitive and easy to use. Commands have a simple and logical structure, making them accessible even for beginners.
- Scripting and automation: Docker CLI allows creating scripts for automating tasks related to containers. This simplifies managing large container clusters and enables integrating Docker with other tools and systems.
- Extensibility: Docker CLI supports plugins that allow extending functionality and adding new commands. This makes Docker CLI flexible and adaptable to different needs and use cases.
Interaction Between Components:
Docker CLI interacts with Docker Daemon through Docker API. When a user enters a command in Docker CLI, it’s sent for processing to Docker Daemon, which performs the necessary actions and returns the result back to the CLI. This interaction provides a powerful and flexible way to manage Docker containers and resources.
Examples of Docker CLI Use:
- Development: Developers can use Docker CLI to quickly create isolated development and testing environments, making it easy to switch between different library and framework versions.
- Deployment: Admins can use Docker CLI to automate the deployment of applications to servers and cloud environments, ensuring stability and predictability of the process.
- Debugging and monitoring: With Docker CLI, it’s easy to access container logs, check their state, and debug applications.

Docker Engine, Docker Daemon, Docker API, and Docker CLI are the main components that ensure the functionality and management of containers within the Docker ecosystem. Docker Engine is the core of the system, consisting of Docker Daemon and Docker API. Docker Daemon performs all operations related to the creation and management of containers, Docker API provides a programmatic interface for interacting with the Daemon, and Docker CLI offers a convenient interface for executing various commands.
GO TO FULL VERSION