Getting started with LXC

Linux Containers (LXC) allows you to run applications in containers within your host operating system. Containers are isolated from your host operating system with their own OS, network and behave as independent machines for all practical purposes. You can run any number of containers to isolate your applications limited by your hardware capacity. Containers are similar in functionality to virtualization but with some key differences. Virtualization involves emulating the hardware layer and the operating system while LXC only emulates the OS layer which makes it extremely lightweight and fast. The emulation is enabled by cgroups and namespaces in the Linux kernel so LXC cannot emulate an OS other than Linux or a specific Linux kernel. The immediate benefit of LXC is speed. Because it is not emulating the hardware layer it operates at near bare metal speeds. So you get all the benefits of virtualization but without the performance overhead. This delivers tremendous benefits in portability and efficiency to users.

Why LXC

LXC is great way to deploy applications. Let's take a web stack like PHP, MySQL, Nginx and an app, you could install it in a VM but with a performance overhead. With a container you get near bare metal speeds and lower resource usage that allows you to scale efficiently. You can maintain a clean and minimal host system that can be recreated quickly, and use lightweight containers to run your apps which because they are deployed in a container are now portable and can be moved across systems easily and cloned, backed up and deployed in seconds!

LXC vs Virtualization

Using LXC