Skip to main content
InterviewHubPRO
Section Overview
Q27

Question 27 of 50

Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)

54%
Docker & Containers (50 Qs)•Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)

Container Runtime Architecture: What is the relationship between Docker CLI, Dockerd, Containerd, runc, and OCI?

senior LevelMost AskedCode ExampleCLISecurity & AuthDocker & Containers

In Simple Words: Modern container infrastructure is decoupled into layered, open-standard components governed by the Open Container Initiative (OCI):

scss
[ docker CLI / kubectl ]
          | (gRPC / HTTP)
          v
[ dockerd / kubelet ] (High-level daemon: builds, volumes, networks)
          | (CRI / gRPC)
          v
[ containerd ] (Container supervisor: image pull, unpack, snapshot management)
          | (shim-v2)
          v
[ runc ] (Low-level OCI reference runtime: executes Linux clone(), unshare(), setns())
          |
          v
[ Linux Kernel ] (Namespaces, cgroups, LSM, capabilities)
  1. OCI Specifications: Standardizes image format (Image Spec) and runtime execution (Runtime Spec).
  2. runc: A lightweight CLI tool that takes an unpacked rootfs directory and a config.json specification, invokes kernel syscalls, and exits once the container process starts.
  3. containerd: Manages the full container lifecycle, image transfers, content storage, and spawns containerd-shim per container so the container stays running even if dockerd restarts.