DEV Community

Cover image for Part-2 More about Docker
Vrukshali Torawane
Vrukshali Torawane

Posted on

2

Part-2 More about Docker

Docker Architecture

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:

  1. The Docker daemon is a service that runs on your host operating system.
  2. 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.

API

Docker Client:

  1. 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.
  2. The docker command uses the Docker API.
  3. The Docker client can communicate with more than one daemon.

Docker Registry:

  1. 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.
  2. 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.

ending of blog

In next blogs, we will learn more about Docker commands.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (1)

Collapse
 
kelvinparmar profile image
Kelvin Parmar

Great share
Amazing blog vrukshali 👏

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay