Linux - ContainersThis forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Although they use the same technologies to implement containers, such as kernel namespaces, cgroups, and overlay filesystems, the two have totally different purposes.
Docker containerizes applications. One of its main promises is the old “write once, write anywhere”. Docker allows you to build your application in containers, either from scratch or on top of other applications. The latter may be the main reason for Docker’s success. Another is probably the Docker hub, where everybody can publish their applications, and everybody can download and use applications as fundamental building blocks to create new ones.
LXD is great for running very resource-efficient virtual private servers, full (or almost) operating systems in containers. It doesn’t have tools for building container images, as far as I know, and doesn’t have anything like the Docker hub.
Thus, you can’t say that one is generally better than the other.
Last edited by berndbausch; 11-05-2018 at 09:38 AM.
With Docker you need to create a Dockerfile with the description of your configuration.
With LXD, you are launching a system container (similar to a VM) with a Linux distribution of your choice (Ubuntu, Debian, etc),
and then you install whatever software you want. The system container is running at all times, just like a VM does.
You can make changes to the system container, you can run apt update, install packages, remove packages.
With Docker, the configuration changes are meant to be done once and not change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.