Docker Architecture Explained
- Vipul Kumar
- System design , Microservices
- November 27, 2024
Table of Contents
π₯οΈ Client-Server Model β Docker uses a client-server architecture where the Docker client communicates with the Docker daemon to manage containers.
π§ Docker Daemon β The daemon is responsible for building, running, and managing Docker containers and images. It listens for API requests and processes them.
π¦ Docker Client β This is the interface through which users interact with Docker. It can communicate with multiple daemons and uses commands like ‘docker build’, ‘docker pull’, and ‘docker run’.
π Docker Host β The host is the environment where Docker runs, including the daemon, images, containers, networks, and storage.
π Docker Registry β This is where Docker images are stored. Docker Hub is a public registry, but private registries can also be set up.
Docker Components
π§ Docker Engine β The core of Docker, facilitating container lifecycle management with components like the CLI, REST API, and daemon.
π¦ Images β Read-only templates used to create containers, containing all necessary instructions and metadata.
π Containers β Encapsulated environments for running applications, created from images and configured with specific options.
π Networks β Docker provides various networking options, including bridge, host, and overlay networks, to connect containers.
πΎ Volumes β Used for persistent storage, allowing data to be shared between containers and the host.
Docker Networking
π Bridge Network β The default network driver, allowing containers on the same host to communicate.
π Host Network β Removes network isolation between the container and the host, useful for performance.
πΈοΈ Overlay Network β Enables communication between containers across different Docker hosts, often used in swarm services.
π« None Network β Disables all networking, providing complete isolation.
π‘ Macvlan Network β Assigns a MAC address to containers, making them appear as physical devices on the network.
Docker Storage
πΎ Data Volumes β Allow data to persist beyond the lifecycle of a container, mounted directly into the container’s filesystem.
π¦ Volume Containers β Used to maintain data state across container restarts, stored on the host.
π Directory Mounts β Host directories can be mounted as volumes, providing direct access to host files.
π Storage Plugins β Enable integration with external storage solutions like Amazon EBS, enhancing data management.
ποΈ Storage Drivers β Manage how images and containers are stored on the Docker host, crucial for performance and efficiency.
Follow me on: LinkedIn | WhatsApp | Medium | Dev.to | Github