3

The typical docker container stack known to me is docker(client) -> dockerd -> containerd -> runC. Then you also hear about libcontainer. I am wondering where libcontainer fits in the above stack and what is it role/purpose.

samshers
  • 1
  • 6
  • 37
  • 84

1 Answers1

1

Short answer:

What had started at github.com/docker/libcontainer
now seems to continue at github.com/opencontainers/runc/tree/master/libcontainer

which means that we now have: dockercontainerdrunclibcontainer


A bit of history

Parts from: A history of low-level Linux container runtimes follow.

At the beginning:

...the upstream Docker developers, including some members of my Red Hat team, decided they wanted a golang-native way to launch containers, rather than launching a separate application. Work began on libcontainer, as a native golang library for launching containers...

and after the Open Container Initiative (OCI) was formed:

...The libcontainer parts of Docker were broken out and donated to the OCI. The upstream Docker engineers and our engineers helped create a new frontend tool to read the OCI Runtime Specification JSON file and interact with libcontainer to run the container. This tool, called runc, was also donated to the OCI.


Further reading:

tgogos
  • 23,218
  • 20
  • 96
  • 128