Can LXC Outpace Docker? A Deep Dive into Lightweight Container Technology
This article compares LXC and Docker, examining how lightweight container technology can reshape application deployment, scalability, and virtualization, while discussing portability, performance, and the future prospects of containers versus traditional virtual machines.
This article explores LXC and Docker container hosting in two parts, and the possibility that lightweight container technology will replace virtualization.
LXC could change how we run and scale applications. Dr. Rami Rosen gave an excellent presentation on the past and present of LXC, offering interesting viewpoints.
Overview of Both
Container technology runs independently and packages application workloads away from the host system. Think of a container as an operating system inside a host OS that can run applications, similar in purpose to a virtual machine.
The LXC project provides minimal container operation samples for managing container lifecycles, leveraging Linux kernel features to enable proper isolation.
Portability
Containers decouple applications from the host OS, allowing them to run on any system that supports LXC. In simple terms, they are very convenient. Users can run any program inside a minimal Linux environment, such as a full LAMP stack.
Because applications and workloads are relatively independent, users can run multiple language versions (PHP, Python, Ruby, Apache) side‑by‑side inside containers. This flexibility enables cloud‑like mobility, replication, and rapid provisioning.
Can Virtualization Do This?
Virtual machines can achieve similar goals but often incur performance loss and reduced flexibility. Containers use cgroups and namespaces in the Linux kernel to provide a lightweight, near‑bare‑metal environment without managing underlying storage.
This fundamentally changes how we virtualize workloads: containers are faster, more elastic, and require only an OS kernel rather than a full hypervisor.
Is VMware Finished?
Not yet. Virtualization is mature, with extensive tooling and ecosystem support, especially for non‑Linux operating systems or specialized hypervisors.
LXC
LXC originated from the development of cgroups and namespaces in the Linux kernel. Early work by Daniel Lezcano and Serge Hallyn dates back to 2009 at IBM. LXC provides tools for container management, advanced networking and storage, and a variety of minimal OS templates. It is now led by Stephane Graber and Serge Hallyn from Ubuntu and is Ubuntu‑supported.
How They Differ
Docker’s goal is to run a single process per container, managing it via Docker’s own networking, storage, and orchestration. LXC runs a full OS environment, allowing any application to run without the restrictions of Docker’s layered filesystem. LXC supports AUFS, overlay, COW cloning, Btrfs, ZFS, LVM thin snapshots, and offers flexible IP configuration (static or dynamic) via standard Linux networking tools.
Docker
Docker was released by dotCloud (now Docker, Inc.) in March 2013, initially built on LXC. It later introduced its own libcontainer tool using core namespaces and cgroups.
Layered Containers
Docker started with AUFS‑based layered containers; later it added support for Btrfs, device‑mapper, and overlay. Docker images consist of a base layer plus additional layers; each commit creates a new immutable image. The layered filesystem introduces complexity and performance overhead.
Single‑Application Containers
Docker limits containers to a single process, making it unsuitable for running multiple services (e.g., init, cron, syslog, ssh) without additional tooling. Complex applications like WordPress often require multiple containers (PHP, Nginx, MySQL) and extra scripts to manage them.
Image Registry
Docker provides a public or private registry for pushing and pulling images, simplifying sharing and distribution of applications.
Dockerfile
A Dockerfile is a script that tells Docker how to build an image from a base, similar to a Bash script used to create an LXC container.
Distancing from LXC
LXC features such as unprivileged containers, live migration, and multi‑host management are being re‑implemented by Docker, but Docker still lacks some of these capabilities. Container usage ultimately depends on user needs.
Future Outlook
Virtualization enables cloud computing by abstracting OS and hardware. Containers combine speed, flexibility, and portability, offering a developer‑friendly model. While Docker packages applications via Dockerfiles and layered filesystems, containers still face challenges in scaling, storage, and networking. Nonetheless, LXC’s lightweight approach provides many advantages of both VMs and containers without requiring major architectural changes.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
