containerd — The Industry-Standard Container Runtime
containerd is the core container runtime that powers Docker and Kubernetes. It manages the complete container lifecycle — image transfer, storage, execution, and supervision — providing a stable, reliable foundation for container platforms.
Instalación con revisión previa
Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.
npx -y tokrepo@latest install 6991f120-3702-11f1-9bc6-00163e2b0d79 --target codexPrimero dry-run, confirma las escrituras y luego ejecuta este comando.
What it is
containerd is the core container runtime that powers both Docker and Kubernetes. It manages the complete container lifecycle: pulling images from registries, storing them on disk, creating container filesystems, executing processes inside containers, and supervising them until termination. It is a graduated CNCF project and the default runtime for most Kubernetes distributions.
containerd is designed for infrastructure engineers, platform teams, and anyone running containers in production. While Docker provides a user-friendly CLI, containerd is the lower-level engine that Docker calls under the hood.
How it saves time or tokens
containerd provides a stable, minimal runtime API that avoids the overhead of Docker's full daemon. For Kubernetes clusters, using containerd directly (without Docker) reduces memory footprint and startup latency per node. For CI/CD pipelines, the lighter runtime means faster container creation and image pulls, which translates to shorter build times across hundreds of daily pipeline runs.
How to use
- Install containerd on Linux:
# Ubuntu/Debian
sudo apt install containerd.io
# Or from GitHub releases
curl -LO https://github.com/containerd/containerd/releases/download/v1.7.0/containerd-1.7.0-linux-amd64.tar.gz
sudo tar -C /usr/local -xzf containerd-1.7.0-linux-amd64.tar.gz
- Start the containerd daemon:
sudo systemctl enable --now containerd
- Use
ctr(the containerd CLI) to pull and run images:
sudo ctr images pull docker.io/library/nginx:latest
sudo ctr run docker.io/library/nginx:latest my-nginx
Example
Pull an image and inspect its layers with the containerd CLI:
# Pull an image
sudo ctr images pull docker.io/library/alpine:latest
# List images
sudo ctr images ls
# Run a container
sudo ctr run --rm docker.io/library/alpine:latest test-container echo 'Hello from containerd'
# Check running containers
sudo ctr containers ls
For Kubernetes, containerd is configured as the CRI runtime in kubelet's configuration file.
Related on TokRepo
- AI Tools for DevOps — DevOps tools for container orchestration and deployment pipelines
- AI Tools for Self-Hosted — Self-hosted infrastructure tools including container runtimes
Common pitfalls
- The
ctrCLI is a debugging tool, not a production interface. Usenerdctlfor a Docker-compatible CLI experience on top of containerd. - containerd does not include a built-in image builder. Use BuildKit or kaniko for building container images in containerd-only environments.
- Kubernetes switched from Docker to containerd as the default runtime. If you are migrating, ensure your container images do not depend on Docker-specific features like Docker socket mounting.
- Always check the official documentation for the latest version-specific changes and migration guides before upgrading in production environments.
- For team deployments, establish clear guidelines on configuration and usage patterns to ensure consistency across developers.
Preguntas frecuentes
Docker is a complete container platform with a user-friendly CLI, image building, networking, and volumes. containerd is the lower-level runtime that Docker uses internally. Kubernetes can use containerd directly without Docker, reducing overhead.
Kubernetes deprecated dockershim because Docker added unnecessary layers between Kubernetes and the container runtime. Using containerd directly through CRI is more efficient, with lower memory usage and faster container operations.
containerd itself does not include an image builder. Use BuildKit, kaniko, or buildah to build container images in environments that only have containerd. BuildKit integrates well with containerd for pushing built images.
nerdctl is a Docker-compatible CLI for containerd. It provides familiar Docker commands (nerdctl run, nerdctl build, nerdctl compose) while using containerd as the runtime. It is the recommended CLI for interactive containerd usage.
Yes. containerd is a graduated CNCF project and the default runtime for most Kubernetes distributions including EKS, GKE, and AKS. It powers billions of containers in production across major cloud providers.
Referencias (3)
- containerd GitHub— containerd is the core container runtime powering Docker and Kubernetes
- CNCF Landscape— Graduated CNCF project
- Kubernetes Documentation— Kubernetes CRI runtime integration
Relacionados en TokRepo
Discusión
Activos relacionados
runc — Industry-Standard OCI Container Runtime
The reference implementation of the OCI runtime specification, runc spawns and manages containers at the lowest level for Docker, containerd, Podman, and CRI-O.
CRI-O — Lightweight Container Runtime for Kubernetes
An OCI-compatible container runtime designed specifically for Kubernetes. CRI-O implements the Container Runtime Interface (CRI) with minimal footprint, providing a stable and secure alternative to Docker and containerd.
Youki — Container Runtime Written in Rust
Youki is an OCI-compliant container runtime written in Rust, designed as a safer and faster alternative to runc. It implements the OCI runtime specification for spawning and managing containers, integrates with containerd and Podman, and leverages Rust's memory safety guarantees to reduce runtime vulnerabilities.
Finch — Open Source Container Development by AWS
Finch is an open-source container development tool by AWS that provides a seamless Docker-compatible CLI backed by containerd, nerdctl, and Lima.