Jump to content

LXC

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Dsimic (talk | contribs) at 01:34, 20 April 2016 (→‎External links: Redundant, no longer produces additional vertical whitespace). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Linux Containers
Developer(s)
  • Kernel: Parallels, IBM, Google, Eric Biederman and others
  • Userspace: Daniel Lezcano, Serge Hallyn, Stéphane Graber and others
Initial releaseAugust 6, 2008; 16 years ago (2008-08-06)[1]
Stable release
1.1.5[2] / 9 November 2015; 8 years ago (2015-11-09)
Repository
Written inC, Python, Shell, Lua
Operating systemLinux
Platformx86, x86-64, IA-64, PowerPC, SPARC, Itanium, ARM
TypeOS-level virtualization
LicenseGNU LGPL v.2.1 (some components under GNU GPL v2 and BSD)
Websitelinuxcontainers.org

LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.

The Linux kernel provides the cgroups functionality that allows limitation and prioritization of resources (CPU, memory, block I/O, network, etc.) without the need for starting any virtual machines, and namespace isolation functionality that allows complete isolation of an applications' view of the operating environment, including process trees, networking, user IDs and mounted file systems.[3]

LXC combines kernel's cgroups and support for isolated namespaces to provide an isolated environment for applications. Docker can also use LXC as one of its execution drivers, enabling image management and providing deployment services.

Overview

LXC provides operating system-level virtualization through a virtual environment that has its own process and network space, instead of creating a full-fledged virtual machine. LXC relies on the Linux kernel cgroups functionality that was released in version 2.6.24. It also relies on other kinds of namespace isolation functionality, which were developed and integrated into the mainline Linux kernel.

Security

Originally, LXC containers were not as secure as other OS-level virtualization methods such as OpenVZ: in Linux kernels before 3.8, the root user of the guest system could run arbitrary code on the host system with root privileges, much like chroot jails.[4] Starting with the LXC 1.0 release, it is possible to run containers as regular users on the host using "unprivileged containers".[5] Unprivileged containers are more limited in that they cannot access hardware directly. Nevertheless, even privileged containers should provide adequate isolation in the LXC 1.0 security model, if properly configured.[5]

Alternatives

LXC is similar to other OS-level virtualization technologies on Linux such as OpenVZ and Linux-VServer, as well as those on other operating systems such as FreeBSD jails, AIX Workload Partitions and Solaris Containers. In contrast to OpenVZ, LXC works in the vanilla Linux kernel requiring no additional patches to be applied to the kernel sources. Version 1 of LXC, which was released on 20 February 2014, is a long-term supported version and intended to be supported for five years.[6]

See also

References

  1. ^ "LXC - Linux Containers". linuxcontainers.org. Retrieved 2014-11-10.
  2. ^ "Linux Containers - LXC - News". linuxcontainers.org. Retrieved 7 March 2016.
  3. ^ Rami Rosen (May 2013). "Resource management: Linux kernel namespaces and cgroups" (PDF). cs.ucsb.edu. Retrieved February 11, 2015.
  4. ^ Marco, d'Itri (2011). "Evading from linux containers". Archived from the original on 9 January 2014. Retrieved 12 February 2014.
  5. ^ a b Graber, Stéphane (1 January 2014). "LXC 1.0: Security features [6/10]". Retrieved 12 February 2014. However, at least in Ubuntu, our default containers ship with what we think is a pretty good configuration of both the cgroup access and an extensive apparmor profile which prevents all attacks that we are aware of. [...] LXC is no longer running as root so even if an attacker manages to escape the container, he'd find himself having the privileges of a regular user on the host
  6. ^ Stéphane Graber (2013-12-20). "LXC 1.0: Your first Ubuntu container". Stgraber.org. Retrieved 2014-02-23.