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

closed as too broad by Braiam, Jeff Schaller, user79743, muru, Scott Feb 18 '16 at 5:30

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 104 down vote accepted

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

LXC

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

https://wiki.archlinux.org/index.php/Linux_Containers

low level ...

https://linuxcontainers.org/

Docker

  • 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

LXD

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

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.

LXD and LXC

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.

Docker

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 techonogy as underlying to communicate with the kernel but today, it uses it´s 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:

  • 1
  • Yeah. Thats pretty new since involves all that zfs on Ubuntu wada-wada. And that is a PRESENTATION. Allways be alert to PDFs or PPTs where there are worlds like "better than that" or "fastest technology" or "more scalable than Y"... – nwildner May 12 '16 at 10:57
  • 5
    I've grown to be pretty skeptical of products coming out of Canonical. They tend to advertise them as what they might be instead of as what they are. Often when that "might be" is still years away. – orodbhen Jun 23 '16 at 20:42
  • Instead of using lowercase lxc, this should be a reference to liblxc. And as far as the tooling is concerned, it can then refer to 1.x through 3.x where lxd (just the daemon) is only available for liblxc >= 2.0 and lxc ist the LXD client program which is the successor to the lxc-*-named LXC 1.x tools. – 0xC0000022L May 3 at 14:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.