Docker in LXC vs VM
-
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.
-
I don't use proxmox, so I guess I don't understand the appeal. I don't see any reason to backup a container or a VM, I just backup configs and data. Backing up a VM makes sense if you have a bunch of customizations, but that's pretty much the entire point of docker, you quarantine your customizations to your configs so it's completely reproducible if you have the configs and data.
-
No, I mean they should setup VMs and LXC containers in automated way. I get the impression that some people here are trying to use a Dockerfile instead of something like Ansible where the end changes apply to a end system instead of creating a template for temporary deployments.
-
I don't think the internet gave particularly good advice here. Sure, there are use-cases for both, and that's why we have both approaches available. But you can't say VMs are better than containers. They're a different thing. They might even be worse in your case. But I mean in the end, all "simple thruths" are wrong.
-
Ease of use mostly, one click to restore everything including the OS is nice. Can also easily move them to other hosts for HA or maintenance.
Not everything runs in docker too, so it's extra useful for those VMs.
-
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?
-
Oh, nice. Thanks!
This is me showing my docker ignorance, I suppose.
-
That's fair.
That said, I can't think of anything I'd want to run that doesn't work in docker, except maybe pf? But I'd probably put that on a dedicated machine anyway. Pretty much everything else runs on Linux or has a completely viable Linux alternative, so I could easily built a docker image for it.
-
- I’m backing up LXCs, like I’d back up a VM. I don’t back up Docker containers, just their config and volumes.
- I don’t think anyone is doing that. We’re talking about installing Docker in LXC. One of the Proxmox rules you can live by is to not install software on the host. I don’t see the problem with installing Docker in an LXC for that reason.
- I’ll snapshot an LXC before running things like a dist-upgrade, or testing something that might break things. It’s very easy, so why not?
- I back up my LXC that has Docker installed because that way it’s easy to restore everything, including local volumes, to various points in time.
-
I tried that too for a time, using samba. But databases didn't work from a share. I just found it easier in the end to have volumes inside the LXC / VM directly
-
Using Samba for a database is crazy. You want unencrypted NFS.
Databases aren't all that big in my case so I usually just leave them be.
-
When I have used nfs in the past, i have issues with different user ID. What is the best solution these days?
After becoming a father last year, the time I have for tinkering is close to 0. I found it easiest to keep all the data in the same vm / lxc, pretty straight forward to maintain
-
Just chiming in, this is not recommended for proxmox
The documentation (FAQ 13) actually directly says that docker should be installed as a QEMU VM on proxmox and that it should not be installed on the Proxmox VE Host
-
Well, I don't use proxmox, however docker coexists with libvirt and other virtualization systems. If there are overlapping networks that docker ant proxmox attempt to manage, they are configurable.
-
S [email protected] shared this topic
-
You want to to keep modification of the host to a minimum in virtualization. It makes troubleshooting so much easier.