72

This stuff is really getting confused now. Can someone please explain what's going on. Just the straight one liner difference.

  • dockerd
  • libcontainerd
  • containerd
  • docker-containerd
  • docker-runc
  • docker-containerd-ctr
  • docker-containerd-shim

thanks

Ivan Aracki
  • 4,861
  • 11
  • 59
  • 73
Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73

3 Answers3

78

dockerd - The Docker daemon itself. The highest level component in your list and also the only 'Docker' product listed. Provides all the nice UX features of Docker.

(docker-)containerd - Also a daemon, listening on a Unix socket, exposes gRPC endpoints. Handles all the low-level container management tasks, storage, image distribution, network attachment, etc...

(docker-)containerd-ctr - A lightweight CLI to directly communicate with containerd. Think of it as how 'docker' is to 'dockerd'.

(docker-)runc - A lightweight binary for actually running containers. Deals with the low-level interfacing with Linux capabilities like cgroups, namespaces, etc...

(docker-)containerd-shim - After runC actually runs the container, it exits (allowing us to not have any long-running processes responsible for our containers). The shim is the component which sits between containerd and runc to facilitate this.

johnharris85
  • 17,264
  • 5
  • 48
  • 52
  • Would you list a source for the above? Thanks. – Freddie Aug 21 '18 at 13:42
  • 4
    Resources for what the pieces do? Or how they interact? This article (https://hackernoon.com/docker-containerd-standalone-runtimes-heres-what-you-should-know-b834ef155426) is probably a good start, good diagram at the bottom. – johnharris85 Aug 21 '18 at 20:53
  • @johnharris85 looks like hackernoon took down that post you've linked to. Any other references that would be helpful? – Athir Nuaimi May 11 '20 at 13:58
  • 4
    https://web.archive.org/web/20170509155503/https://hackernoon.com/docker-containerd-standalone-runtimes-heres-what-you-should-know-b834ef155426 @AthirNuaimi – johnharris85 May 11 '20 at 20:44
17

From the documentation:

runC is built on libcontainer which is the same container library powering a Docker engine installation. Prior to the version 1.11, Docker engine was used to manage volumes, networks, containers, images etc.. Now, the Docker architecture is broken into four components:

Docker engine 
containerd
containerd-shm
runC. 

The binaries are respectively called:

docker
docker-containerd
docker-containerd-shim
docker-runc.

Image

https://medium.com/faun/docker-containerd-standalone-runtimes-heres-what-you-should-know-b834ef155426

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73
5

High-level picture for further better understanding: (read other good answers before this)

Architecture

Curated pictures collection for quick understanding:

enter image description here

enter image description here

enter image description here

Sources:

  1. Containerd
  2. blog.caoyu.info
  3. Twitter

There is a reason for this saying "A picture is worth a thousand words"

surya
  • 719
  • 5
  • 13
  • This doesn't help with understanding at all (in particular the image you called "architecture".) For starters, the image doesn't explain where dockerd sits, and there's no indication of what piece in a layer uses what othe piece in another layer, what's the communication or control flows are. Most importantly, it doesn't explain the justification/use case. Without that, we don't have an architectural diagram. We just have a powerpoint slide without labels ;) – luis.espinal Feb 04 '22 at 19:55
  • 1
    As I mentioned, this is a high-level picture. So, obviously, it is not for starters/beginners. Expecting some knowledge on docker- before checking this out. I felt somehow it helps me to understand the overall picture related to this question, hence added this for people like me who comes here. Feel free to edit this answer with whatever relevant info you want to add :) – surya Feb 06 '22 at 06:50