Docker Architecture
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon.
Docker uses a technology called namespaces to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.
Docker Daemon:
- The Docker daemon is a service that runs on your host operating system.
- The Docker daemon (dockerd) listens for Docker API requests from client and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.
Docker Client:
- The Docker client (docker CLI) is the primary way that many Docker users interact with Docker. When you use commands such as docker run, the client sends these commands to dockerd, which carries them out.
- The docker command uses the Docker API.
- The Docker client can communicate with more than one daemon.
Docker Registry:
- A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker is configured to look for images on Docker Hub by default.
- You can even run your own private registry.
Docker objects
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects.
Images:
- An image is a template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization.
- For example, you may build an image which is based on the ubuntu image, but installs the Apache web server and your application, as well as the configuration details needed to make your application run.
Containers:
- A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI.
- By default, a container is relatively well isolated from other containers and its host machine.
- When a container is removed, any changes to its state that are not stored in persistent storage disappear.
In next blogs, we will learn more about Docker commands.
Top comments (1)
Great share
Amazing blog vrukshali 👏