How Does Docker Work

Technext
3 min readOct 23, 2022

--

How Does Docker Work

First of all, everyone who just listens to the name Docker and Container thinks that both are the same but the thinking is totally wrong docker is basically a technology that manages containers efficiently. Docker is a kind of virtual machine but it uses your kernel to run the container you can call it OS-level virtualization. So we know that a virtual machine creates a guest os to run any app on this machine. But on the other hand, docker doesn’t need any guest os to run the container in your machine it uses your kernel to run the container.

How Does Docker Work — Virtual machine and container

Initially, docker was built on top of Linux Container(LXC). But later Docker start using its own runtime called libcontainer. It uses a Copy-on-write union file system for its image storage. For using this model when you change something in a container only those changes will be written.

Now we talk about docker core architecture:

Docker uses a client-server architecture. From the very beginning, docker worked on monolithic architecture but now it’s working with those three components:

  1. Docker Engine
  2. docker-containerd
  3. Docker-runc
  4. Docker engine: So Docker engine is consist of the docker daemon(dockerd), API interface, and Docker CLI. Docker Daemon is a server that is responsible for all actions related to the container. The CLI basically uses docker API to interact with docker daemon via its command. The docker daemon is responsible for creating, and managing docker images, containers, networks, and volumes.
How Does Docker Work

2. docker-containerd (containerd): docker-container is responsible for downloading the docker images and running them as containers. It exposes its API to receive instruction from the docker daemon.

3. Docker-runc: it’s a container runtime that creates namespace and cgroups required for a container. Namespace helps virtualize system resources for a container, like networking or file systems and Cgroups provide you limit on the resources like CPU or how much memory each container needs.

I think now you get a clear idea about docker architecture.

Credit

This post was written by one of the best software engineers at Technext — Sakin Hossain.

Technext helps startups and businesses hire great software engineers.

You can hire an offshore software development team from Technext.

Please visit the services we offer as offshore software development services for your startups.

Have any projects?

Reach out to hire the brilliant software engineering and UI/UX design team. Build your dream projects.

Let’s collaborate

Speak with our leadership team directly.

https://bd.linkedin.com/in/syed-rezwanul-haque-b7889628

--

--

Technext

Technext is an offshore software development, UI/UX design and digital company