What is a shim (`containerd-shim-runc-v2`) and why is it needed?
AdvancedConceptContainers, VMs & Isolation Internals
Answer
The shim is a small per-container (or per-pod) process that becomes the parent of the container after runc exits. It keeps stdio open, reports exit status, and reaps children. Because of it, you can restart containerd or dockerd without killing running containers (live-restore for dockerd), and runc does not need to stay resident.
More on Containers, VMs & Isolation Internals
What is a container, in one sentence?BeginnerHow do containers differ from virtual machines?BeginnerCan a Linux container run a Windows application, or the reverse?IntermediateWhat are Linux namespaces? Name the ones Docker uses.BeginnerWhat are cgroups and what do they do for containers?BeginnerWhat is PID 1 in a container and why does it matter?Intermediate