LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Containers (https://www.linuxquestions.org/questions/linux-containers-122/)
-   -   Docker or LXD (https://www.linuxquestions.org/questions/linux-containers-122/docker-or-lxd-4175641787/)

nejnej25 11-05-2018 08:54 AM

Docker or LXD
 
Hi, just crowdsourcing.

Which is better to use for containers. Docker or LXD and why?

Thanks!

berndbausch 11-05-2018 09:36 AM

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.

simosx 01-09-2019 11:41 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.


All times are GMT -5. The time now is 09:14 AM.