Interview Prep/Docker/Containers, VMs & Isolation Internals

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.

All Docker questions Roadmap: Docker & containers

More on Containers, VMs & Isolation Internals