Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between LXC and libcontainer [closed]

Tags:

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 ?

like image 374
Yogesh Jilhawar Avatar asked Dec 08 '15 09:12

Yogesh Jilhawar


People also ask

What is the difference between LXC and LXD?

LXD is an open source container management extension for Linux Containers (LXC). LXD both improves upon existing LXC features and provides new features and functionality to build and manage Linux containers.

Does Docker still use LXC?

Docker is developed in the Go language and utilizes LXC, cgroups, and the Linux kernel itself. Since it's based on LXC, a Docker container does not include a separate operating system; instead it relies on the operating system's own functionality as provided by the underlying infrastructure.

Is libcontainer a container technology?

Libcontainer provides a standard interface to making sandboxes or containers inside an OS. With it, a container can interface in a predictable way with the host OS's resources, security, and behavioral controls, and the app inside it can be controlled as expected.

What is difference between LXC and Docker?

LXC provides a set of tools to manage your container as well as templates to create a virtual environment of the most common Linux OS. Docker is an open-source containerization technology that focuses on running a single application in an isolated environment.


1 Answers

  • Linux Containers (LXC) was used before docker 0.9 (On March 13, 2014, with the release of version 0.9, Docker dropped LXC as the default execution environment and replaced it with its own libcontainer library) as one execution driver by docker, and offered a userspace interface for the Linux kernel containment features. It is very specific to Linux

  • libcontainer (now opencontainers/runc) is an abstraction, in order to support a wider range of isolation technologies as described in this article

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

like image 92
VonC Avatar answered Oct 20 '22 00:10

VonC