You could run podman or other OCI containers inside LXD. I use LXD to test multi node K8s (K3s) on my desktop system.
But podman also supports systemd inside a container and along with macvlan networking you can pretty much build an "independent" container acting almost as a VM.
Would LXD provide any other advantages/differences to that?
Make sure to post the article on HN if it comes around, I'm sure it will be appreciated.
That is something I'm yet to try. I will post whatever I can on HN. Thanks!
I have used both lxd and podman.
[1] https://ubuntu.com/blog/lxd-virtual-machines-an-overview
[2] https://developers.redhat.com/blog/2019/04/24/how-to-run-sys...
LXD is a management layer over LXC and Qemu(KVM?). LXC is all about system containers. The Qemu support is a recent addition [1]. LXD supported only LXC system containers until then.
> Containers you run with docker and podman are fully capable of running multiple processes
Yes. I have done this. But it was very unwieldy - probably because docker, podman etc weren't designed to run system containers.
[1] https://ubuntu.com/blog/lxd-virtual-machines-an-overview
In addition, there are orchestrators which can run LXC containers (LXD is a management layer over LXC). Hashicorp Nomad is noteworthy.
Added later: K8s runs OCI containers. All OCI containers I have seen are application containers. I don't know if OCI specification supports system containers.
The original idea behind LXD was to build packages in a system equivalent to your real system but without spamming your dpkg database and filesystem with all the required -dev files. The idea behind Docker (which podman is a better implementation of and extension to) was to be able to have three different versions of Apache ephemerally on your system to match the versions used by three different projects today.
Ultimately you can do both with either (and I generally use podman to build packages, as an example) but if you do that you aren't playing to the project's strengths.
Toolbox and distrobox are sort of middle grounds that do both of them well enough to be tolerable.
One advantage of having a system container is you can use a package manager to update your applications. With Podman, you have to replace the entire container, with LXD you can just "PATCH" the container. This results in much faster upgrade / lifecycle management.
You can read about this on my blog post. https://zacksiri.dev/posts/why-i-created-pakman