4

I am new to Docker and was recently reading a book on it. In that it was stated that containerd uses runc to create and run the container and that runc is the container runtime. All was fine until i learnt about shim. After creating the container, runc exits and hands over the container to shim.This got me confused. If runc is where the container runs how can it exit after creating the container?

Alakay1197
  • 47
  • 4

1 Answers1

1

The question was well thought.
I could get the answer referring here

Containerd doesn’t actually create the container runtime. It sets up the environment and then invokes containerd-shim to start the container runtime via the configured OCI runtime (controlled with the containerd “–runtime” option) . For most modern systems the container runtime is based on runc.

Hope this helps. Let me know.

tgogos
  • 23,218
  • 20
  • 96
  • 128
Srini M
  • 495
  • 2
  • 9