What is the difference between Docker and containerd?
Docker is a broad set of technologies that are used to work with containers. containerd is an example of a container runtime. A container runtime is that process that does the actual work of creating, running, and destroying containers. Docker uses containerd as its runtime. Let’s explore the difference between the two and the details of each.
Docker vs containerd differences
As mentioned earlier, Docker technologies allow you to interact with the container runtime. For example, when you execute the following command
docker run nginx
You are using the command-line interface (CLI) tool, docker. When the command set docker run is invoked, docker tells the container runtime to create a container based on the container image, nginx. Behind the scenes, containerd takes over and downloads the associated container image. Then containerd does the work of creating the container from that image.
The host operating system has no concept of a container. However, it does provide the features such as namespaces, cgroups and file system overlays that make a container possible. containerd along with another component called a low-level runtime, in this case, runc, does the work of interacting with the host operating system’s kernel to do the low-level workdsthat goes with creating a container.
Today containerd is part of the Cloud Native Computing Foundation (CNCF), an organization that supports Kubernetes and Docker based deployments. Docker is still an independent project.