What is the difference between Docker, LXD, and LXC. Do they offer the same services or different.
2 Answers
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 ...
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
- by Canonical, Ltd
- a container system making use of LXC containers
- so that you can:
run LXD on Ubuntu and spin up instances of RHEL, CentOS, SUSE, Debian, Ubuntu and just about any other Linux too, instantly, ...
http://www.zdnet.com/article/ubuntu-lxd-not-a-docker-replacement-a-docker-enhancement/
Docker vs LXD
- Docker specializes in deploying apps
- LXD specializes in deploying (Linux) Virtual Machines
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
- installing LXD includes a command line program coincidentally named
lxc
http://blog.scottlowe.org/2015/05/06/quick-intro-lxd/
-
-
23Docker hasn't used LXC under the hood since 2014: blog.docker.com/2014/03/… Sep 12, 2018 at 7:57
-
This image can help you to understand the main difference between them:
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 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:
-
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"...– user34720May 12, 2016 at 10:57
-
5I'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.– orodbhenJun 23, 2016 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 thelxc-*
-named LXC 1.x tools. May 3, 2018 at 14:52
Although Docker started out as an open source project to build specialized LXC, it later morphed into its own container runtime environment
more on the link