Difference between LXC and libcontainer

15,496

Solution 1

http://blog.docker.com/wp-content/uploads/2014/03/docker-execdriver-diagram.png

That means Docker is abstracting itself from its original implementation, allowing other vendors (like CoreOS) to implement their own version of containers.


Note: since then (What’s the difference between runc, containerd, docker?) shows:

In 2016 the container space was booming and docker decided to split the monolith into separate parts, some of which other projects can even build on — that’s how containerd happened. That was Docker 1.11 (so pretty much ancient history).
Containerd is a daemon that acts as API facade for various container runtimes and OS. When using containerd, you no longer work with syscalls, instead you work with higher-level entities like snapshot and container — the rest is abstracted away.
If you want to understand containerd even more in depth, there’s a design documentation in their GitHub repo.
Under the hood, containerd uses runc to do all the linux work.

See more at "How containerd compares to runC"

containerd

Solution 2

I would rather recommend you to go through this link to have a complete understanding of why Docker started libcontainer

http://www.zdnet.com/article/docker-libcontainer-unifies-linux-container-powers/

Share:
15,496

Related videos on Youtube

Yogesh Jilhawar
Author by

Yogesh Jilhawar

Updated on September 14, 2022

Comments

  • Yogesh Jilhawar
    Yogesh Jilhawar over 1 year

    While going through docker docs, I found that docker is now using libcontainer instead of LXC. Has anyone idea about how libcontainer is better ( If so..) than LXC ?

  • ISanych
    ISanych over 8 years
    question was about libcontainer, not about libnetwork
  • VonC
    VonC over 8 years
    @ISanych right, I'll rewrite the answer then
  • Yogesh Jilhawar
    Yogesh Jilhawar over 8 years
    @VonC thanks for the reply. It means that, now docker has namespaces, cgroups ( from LXC ) and additional kernel features selinux, netlink, capabilities etc coming from libcontainer. Am I right VonC ?
  • VonC
    VonC over 8 years
    @YogeshJilhawar yes, that is what the SPEC mentions (github.com/opencontainers/runc/blob/…: amespaces, standard filesystem setup, a default Linux capability set, and information about resource reservations)