Containers

What is shim in regards to Docker?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

shim is the process that becomes the container's parent when runc process exists. It's responsible for:

  • Reporting exit code back to the Docker daemon
  • Making sure the container doesn't terminate if the daemon is being restarted. It does so by keeping the stdout and stdin open