I think this slide from Mark’s presentation on Container Camp 2016 explains a lot in a single image, and makes a lot of sense to me:
Video link: Why we need a different container purely for apps - Mark Shuttleworth (Canonical) - YouTube
To sum it up short:
- LXC/LXD are “machine containers” with a persistent filesystem that works like a VM
- Docker are “process containers” with an overlay filesystem over a static image (with options for persistent storage)
- Snaps are “application containers” that directly extends functionality of the underlying host
I mostly use Docker for all the different web services on my home network (UniFi, Grafana/Prometheus, Bookstack, Nextcloud, Syncthing, Transmission, Proxy Manager, Iperf3 etc.), since Docker is especially well suited for isolating data and exposing ports for different services.
If I would ever need “VM” like functionality (where I needed to install custom packages that would persist in the container), I would take a look at LXC/LXD.
I have mixed feelings about snaps, and I think that depends entirely on your usecase. For those apps that are officially distributed as snaps, they might be worth it (for instance LXD or Multipass, which are both official Canonical snaps).
I know you didn’t ask about snaps, but I mentioned it anyway - sorry!
Hope that helps a bit.