1. dockerD (Docker Daemon)

  • Definition: dockerD (Docker Daemon) is the core component of Docker, responsible for managing Docker containers. It handles container operations such as starting, stopping, and networking, and it communicates with Docker clients through the Docker API.

  • Role: It is the server-side part of Docker, which manages all container-related tasks on a host machine. It works directly with the container runtime (Docker Engine) to execute container operations.

  • Key Features:

    • Manages Docker containers, images, and networks.
    • Communicates with the Docker client (docker CLI) to handle container lifecycle requests.
    • Uses the Docker Engine as the runtime to execute container workloads.

2. DockerShim (Dockershim)

  • Definition: DockerShim was a Kubernetes component used to interface with Docker as the container runtime. It acted as a translation layer between Kubernetes and Docker, allowing Kubernetes to manage Docker containers.

  • Role in Kubernetes:

    • Before the introduction of the Container Runtime Interface (CRI), Kubernetes natively supported Docker as the container runtime. DockerShim allowed Kubernetes to communicate with Docker, ensuring container orchestration.
    • It allowed Kubernetes to continue using Docker while enabling Kubernetes to evolve into a container runtime-agnostic system.
  • Deprecation: Kubernetes deprecated DockerShim in version 1.20 and completely removed it by version 1.24 (2022), signaling Kubernetes’ move away from being tied to Docker directly. Kubernetes now uses the CRI to support multiple container runtimes, such as containerd and CRI-O.


3. Container Runtime Interface (CRI)

  • Definition: The Container Runtime Interface (CRI) is an API standard that allows Kubernetes to interact with various container runtimes. It abstracts the underlying container runtime from Kubernetes, enabling the support of different runtimes beyond Docker.

  • Role:

    • CRI decouples Kubernetes from specific container runtimes, making it possible for Kubernetes to work with any runtime that implements the CRI.
    • Container runtimes like containerd and CRI-O are CRI-compliant, enabling them to integrate with Kubernetes without additional components like DockerShim.
  • Key Features:

    • Runtime agnostic: Supports any container runtime that implements the CRI standard.
    • Enhances Kubernetes flexibility in selecting container runtimes.
    • Simplifies Kubernetes’ architecture by eliminating the need for DockerShim.

4. Open Container Initiative (OCI)

  • Definition: The Open Container Initiative (OCI) is an open governance body established to create industry standards for container formats and runtimes. It was founded by Docker and other industry leaders to standardize container technology.

  • Key Components:

    1. OCI Image Specification: Defines the container image format (how containers are packaged).
    2. OCI Runtime Specification: Defines how containers are run (the process lifecycle, filesystem, namespaces, etc.).
  • Role:

    • OCI ensures interoperability between different container runtimes by providing a common image format and runtime specification.
    • Runtimes such as containerd and runc comply with OCI standards, ensuring that images can run across different platforms and runtimes.

Summary of Relationships:

  • dockerD (Docker Daemon): Manages Docker containers using Docker Engine as the runtime.

  • DockerShim: Deprecated Kubernetes component that allowed Kubernetes to interact with Docker as the container runtime. Replaced by the CRI.

  • Container Runtime Interface (CRI): An API layer in Kubernetes that enables interaction with any container runtime that implements the CRI standard, such as containerd or CRI-O.

  • Open Container Initiative (OCI): A set of standards for container image formats and runtimes, ensuring that container images and runtimes are interoperable across platforms.

Current Kubernetes Ecosystem:

  • Docker itself is no longer directly supported by Kubernetes. Instead, container runtimes like containerd or CRI-O (both of which are CRI and OCI-compliant) are used to run containers.