What is the difference between Docker, LXD, and LXC

What is the difference between Docker, LXD, and LXC. Do they offer the same services or different.

Asked By: Ijaz Ahmad


No, LXC, Docker, and LXD, are not quite the same. In short:


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


low level …



  • by Docker, Inc
  • a container system making use of LXC containers
  • so you can: Build, Ship, and Run Any App, Anywhere http://www.docker.com


Docker vs LXD

  • Docker specializes in deploying apps
  • LXD specializes in deploying (Linux) Virtual Machines

Infographic of Docker vs LXD

Source: http://linux.softpedia.com/blog/infographic-lxd-machine-containers-from-ubuntu-linux-492602.shtml

Originally: https://insights.ubuntu.com/2015/09/23/infographic-lxd-machine-containers-from-ubuntu/

Minor technical note

Answered By: clarity123

This image can help you to understand the main difference between them:

lxc x docker

What all of them have in common, is that all these 3 technologies are related to containers.

Containers are a lightweight virtualization mechanism that does not require you to set up a virtual machine on an emulation of physical hardware. In Linux, what they have in common are the Kernel features used: cgroups, namespaces(ipc, network, user, pid, mount). They also try to create more safe environments by creating unprivileged containers and integrating with security features like selinux. These technologies export APIs to better integrate with other softwares.


These two integrates the same family where:

  • lxc: userspace interface for the Linux kernel containment features. This is the guy who manages Kernel namespaces, Apparmor and SELinux profiles, Chroots , Kernel capabilities and every other kernel related stuff
  • lxd: is a container "hypervisor". It is composed by a daemon(lxd), the command-line interface(lxc) and a OpenStack plugin. This guy was developed to provide more flexibility and features to lxc, while it still uses it under-the-hood.

Basically, a Self-Contained OS userpace is created with it´s isolated infrastructure. lxc underlies more directly on OS features for networking and storage than Docker.

You create many virtual machines, that have userspace and kernel isolations, but they are not complete virtual machines since they are not running separeted kernels, neither are paravirtualized for the same reason.

Canonical is the main sponsor here, and Oracle is also investing man hours on this technology.


It has some differences, being the biggest of them the Engine that wraps-up Applications with a self-contained filesystem instead of a base "Userspace image". The idea is to contain the app and base image to create the impression that the App is a single process inside the engine. Docker used lxc technology as underlying to communicate with the kernel, but today, it uses its own library, libcontainer.

The filesystem is an abstraction to Docker, while lxc uses filesystem features directly. Network is also an abstraction while with lxc you can set up ip addresses and routing configurations more easily. Some "App Store like" sites are being maintained by Microsoft, Amazon, Vmware, IBM and other players.

Docker. INC. is the main sponsor here. Vmware is also investing in this technology.

Related container technology:

These are other container technologies that Linux have: OpenVZ and Linux-VServer

Related Stuff:

Answered By: user34720
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.