top | item 37583898

(no title)

nexle | 2 years ago

Basically, they have different use cases. Docker is designed to run a single application with immutable volume, while LXD is designed to run a (mutable) OS, like a VM. Sure, you can use Docker run an OS, but it is not designed for that.

Imagine you need to install an application that will install/persist some files to /etc, some files to /var, some files to /bin... etc. In Docker, you will need to install that application during build time, specify volume path, specify the ENTRYPOINT to the application and use the resulting image to run it. In LXD, you can exec into the container and install it, setup systemd service to run it on startup - exactly like what you would do in a VM.

discuss

order

curt15|2 years ago

What about Docker's design is incompatible with running systemd? Because that seems to be mainly what LXD containers offer over typical docker containers.

happymellon|2 years ago

Docker has whatever you run be pid1, which systemd doesn't like.

It's easily fixable but requires customisation as docker doesn't want to support it by default.

So nothing about OCI images is incompatible, but docker specifically yes.