I use individual lxc for each docker compose so I don’t have to revert 8 services at once if I need to restore.
Comment on Docker in LXC vs VM
MangoPenguin@lemmy.blahaj.zone 2 days ago
Regardless of VM or LXC, I would only install docker once. There’s generally no need to create multiple docker VMs/LXCs on the same host.
Backups are the same with VM or LXC on Proxmox.
The main advantages of LXC that I can think of:
- Slightly less resource overhead, but not much (debian minimal or alpine VM is pretty lightweight already).
- Ability to pass-through directories from the host.
- Ability to change CPU cores or RAM while it’s running.
non_burglar@lemmy.world 2 days ago
sugar_in_your_tea@sh.itjust.works 2 days ago
You don’t have to revert 8 services, you can stop/start them independently:
docker compose stop <service name>
.This is actually how I update my services, I just stop the ones I want to update, pull, and restart them. I do them one or two at a time, mostly to mitigate issues. The same is true for pulling down new versions, my process is:
- edit the docker-compose file to update the image version(s) (e.g. from 1.0 -> 1.1, or 1.1 -> 2.0)
- pull new images (doesn’t impact running services)
docker compose up -d
brings up any stopped services using new image(s)- test
- go back to 1 until all services are done
I do this whenever I remember, and it works pretty well.
non_burglar@lemmy.world 1 day ago
Oh, nice. Thanks!
This is me showing my docker ignorance, I suppose.
MangoPenguin@lemmy.blahaj.zone 2 days ago
How do you handle backups? Install restic or whatever in every container and set it up? What about updates for the OS and docker images, watchtower on them I imagine?
It sounds like a ton of admin overhead for no real benefit to me.
non_burglar@lemmy.world 1 day ago
I just snapshot the parent lxc. The data itself isn’t part of the container at any level, so if I bung up compose yml or env, I can just flip it back. The only real benefit is that all my backups are in the same place in the same format.
Like I’m not actually opposed to managing docker in one unit, I just haven’t got there yet and this has worked so far.
If I were to move to a single platform for several docker, what would you suggest? For admin and backups?
possiblylinux127@lemmy.zip 2 days ago
Also LXC shares the host filesystem to there is less concern with corruption due to power loss.