Contents
What do you use LXC for?
LXC (LinuX Containers) is a OS-level virtualization technology that allows creation and running of multiple isolated Linux virtual environments (VE) on a single control host. These isolation levels or containers can be used to either sandbox specific applications, or to emulate an entirely new host.
Should I use LXC or docker?
LXC focuses on OS containerization, while Docker thrives on application containerization. Docker is single-purpose application virtualization, and LXC is multi-purpose operating system virtualization. In this case, LXC specializes in deploying Linux Virtual machines. Docker specializes in deploying applications.
How does LXC connect to the outside world?
Networking By default LXC creates a private network namespace for each container, which includes a layer 2 networking stack. Containers usually connect to the outside world by either having a physical NIC or a veth tunnel endpoint passed into the container. LXC creates a NATed bridge, lxcbr0, at host startup.
Can a LXC container run on a Windows machine?
So, say your host machine is running Ubuntu. You can easily run Red Hat or CentOS on this machine using LXC containers. LXC, unlike some other containerization services, can not run Mac OS or Windows. This is because LXC containers rely on the host kernel directly.
Is it possible to SSH into a LXC container?
Apps that use LXC, however, are meant to be persistent. You can ssh into an LXC container as you’d do into a remote Linux host and manage the environment. Docker does not allow this, and you’ll be using specialized tools to manage deployment and testing.
What do you need to know about LXC in Linux?
LXC does not use any fancy resource control mechanisms like hypervisors. Rather, it utilizes host containment features provided directly by the Linux kernel. The primary components it relies on are namespaces and cgroups. They were first added to the kernel since version 2.6.24.