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.
-
See https://stackoverflow.com/a/31219102/8543203 – Ali Tou May 27 '20 at 05:07
1 Answers
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: docker → containerd → runc → libcontainer
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 withlibcontainer
to run the container. This tool, calledrunc
, was also donated to the OCI.
Further reading:

- 23,218
- 20
- 96
- 128