Difference between revisions of "Containerd-shim"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
  containerd-shim -namespace moby
 
  containerd-shim -namespace moby
  
 +
 +
http://alexander.holbreich.org/docker-components-explained/
 +
The shim allows for daemonless containers. According to Michael Crosby it's basically sits as the parent of the container's process to facilitate a few things.
 +
 +
First it allows the runtimes, i.e. runc,to exit after it starts the container. This way we don't have to have the long running runtime processes for containers.
 +
Second it keeps the STDIO and other fds open for the container in case containerd and/or docker both die. If the shim was not running then the parent side of the pipes or the TTY master would be closed and the container would exit.
 +
Finally it allows the container's exit status to be reported back to a higher level tool like docker without having the be the actual parent of the container's process and do a wait4.
  
  

Latest revision as of 13:25, 13 February 2020

containerd-shim -namespace moby


http://alexander.holbreich.org/docker-components-explained/ The shim allows for daemonless containers. According to Michael Crosby it's basically sits as the parent of the container's process to facilitate a few things.

First it allows the runtimes, i.e. runc,to exit after it starts the container. This way we don't have to have the long running runtime processes for containers. Second it keeps the STDIO and other fds open for the container in case containerd and/or docker both die. If the shim was not running then the parent side of the pipes or the TTY master would be closed and the container would exit. Finally it allows the container's exit status to be reported back to a higher level tool like docker without having the be the actual parent of the container's process and do a wait4.


See also[edit]

Advertising: