containerd vs. Docker: What’s the Difference?

This article explores the differences between containerd, a container runtime of Docker, and Docker, which is a container engine.

containerd

4 minutes
image_pdfimage_print

containerd (official brand name is written in lowercase) is the container runtime of Docker, an open source containerization platform. Container runtimes are software components that can run containers on a host operating system. 

Comparing containerd to Docker is a little like comparing a turbocharger to an engine or an air-conditioning system to a house. There’s no direct comparison between the two, although they’re definitely related and almost always used together, but typically not interchangeably. 

Efficient IT Infrastructure Saves More Than Just Energy Costs

What Is Docker?

Although it’s become synonymous with the word “container,” Docker itself isn’t a container but rather a very popular developer tool for creating, working with, and managing containers. In other words, it’s a container engine, a system that allows code developed in one computing environment to work in another computing environment. In this way, Docker is really a facilitator and enabler of application development. It’s a software platform that simplifies the process of building, running, managing, and distributing applications, and it achieves this by virtualizing the operating system of the computer on which it’s installed and running. 

Containers are the portable, self-contained environments that Docker and other container engines, such as CRI-O, RKT, and LXD, use to package, ship, and run applications. A container runtime such as containerd, the container runtime developed by Docker, is a component of a container engine that mounts the container and works with the operating system kernel to start and support the containerization process. 

Docker, Oracle 12c and Persistent Storage

What Is containerd?

containerd is a Docker-developed container runtime that manages the life cycle of a container on a physical or virtual machine (i.e., a host). It creates, starts, stops, and destroys containers. It can also pull container images from container registries, mount storage, and enable networking for a container.

In February 2019, containerd became an official project within the Cloud Native Computing Foundation (CNCF), just as Kubernetes, Prometheus, Envoy, and CoreDNS have. 

Modern Hybrid Cloud Solutions

How containerd Works

containerd is a daemon, meaning it’s a computer program that runs as a background process rather than being under the direct control of an interactive user. It’s available for both Linux and Windows. 

containerd

Figure 1: How containerd works. Source: Docker 

containerd manages the complete container life cycle of its host system—from image transfer and storage to container execution and supervision to low-level storage to network attachments and more.

containerd vs. CRI-O

A containerd alternative, CRI-O is another high-level container runtime that implements the Container Runtime Interface (CRI). It pulls container images from registries, manages them on disk, and launches a lower-level runtime to run container processes. Since they’re both container runtimes, you typically wouldn’t be using containers with CRI-O as you only need one or the other. 

Docker vs. containerd: FAQ

Does Docker Still Use containerd? 

Docker designed containerd, which is now a part of the CNCF, an organization that supports Kubernetes- and Docker-based deployments. Docker is still an independent project that uses containerd as its runtime. 

Can I Use containerd Instead of Docker?

Yes—even though containerd is a container runtime and Docker is a container engine, it’s possible. Docker is a tool that tells the container runtime, in this case, containerd, to create a container based on the container image. Although the host operating system has no concept of a container, it does provide features such as namespaces, cgroups, and file system overlays that make a container possible. This means that it would be possible to use containerd along with another component called a low-level runtime to do the work of interacting with the host operating system’s kernel to create a container and in doing so assume the functionality of Docker. 

Is containerd Compatible With Docker?

Yes. containerd was designed by Docker and is completely compatible with Docker. 

Can I Migrate From Docker to containerd?

Yes—you can. Google Cloud provides documentation on how to do this. 

Get Container Storage as a Service

Containers, like anything else, require storage, and the more flexible and scalable your storage solution, the more advantages you’ll be able to get out of your container usage and your containerization strategies. 

Pure’s container storage as a service for hybrid cloud gives developers the agility of public cloud with the reliability and security of on-premises infrastructure, allowing them to:

  • Build and update enterprise applications faster, without compromising on security, data protection, and enterprise policies.
  • Easily meet scalability and reliability needs. 
  • Protect containerized applications with optimized cloud-native disaster recovery and backups for all Kubernetes workloads.

Get started with Pure today. Contact us to learn more. 

Written By: