Year-End Discount: 10% OFF 1-year and 20% OFF 2-year subscriptions!

Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

lxc
docker
linux
libcontainer

LXC vs. libcontainer

Anusheh Zohair Mustafeez

Tired of LeetCode? 😩

Learn the 24 patterns to solve any coding interview question without getting lost in a maze of LeetCode-style practice problems. Practice your skills in a hands-on, setup-free coding environment. 💪

Before its version 0.9 release in March 2014, Docker used Linux Containers (LXC for short) as its default execution environment. However, with the release, LXC was made optional with Docker’s own libcontainer taking over as the default execution environment. In this shot,​ we will explore why Docker decided to make this switch.

svg viewer

LXC, Docker’s earlier choice, was limited to Linux. It offered a userspace interface for the Linux kernel containment features. Libcontainer, on the other hand, is an abstraction that supports a broader range of isolation technologies.

The other main advantage that libcontainer has over LXC is that it was developed to access the kernel’s container APIs directly to remove dependencies. With its libcontainer library, Docker can manipulate namespaces, control groups, capabilities, apparmor profiles, network interfaces, and firewalling rules without relying on LXC and other external packages. Reduced dependencies make libcontainer more stable and efficient. Libcontainer also allows for more reusability and is easier to adopt by other vendors (like CoreOS) as compared to LXC.

RELATED TAGS

lxc
docker
linux
libcontainer

CONTRIBUTOR

Anusheh Zohair Mustafeez
Copyright ©2022 Educative, Inc. All rights reserved

Tired of LeetCode? 😩

Learn the 24 patterns to solve any coding interview question without getting lost in a maze of LeetCode-style practice problems. Practice your skills in a hands-on, setup-free coding environment. 💪

Keep Exploring
Related Courses