new to proxmox - docker best practices?
I recently installed proxmox on two 7050 micro pcs, and set up a third box with PBS.
Within proxmox is it best to run docker in a LXC or a VM ?
Should I run one docker image per instance, or all in the same instance ?
I would like to back this stuff up to PBS. Is this a factor in this decision?
I have plex, node-red, influxdb, mosquitto and grafana dockers on an old pc that I wish to rehost to proxmox.
Both works, including backups, but the official recommendation is to use a VM for better isolation.
https://pve.proxmox.com/wiki/Linux_Container
1 VM per Docker stack is pretty resource intensive so many people put many docker stacks in 1 VM which is fine. You can maybe have 1 VM for public facing services and 1 for internal or similar.
I use a single LXC for all my docker stuff. You can use a VM too, either way works. The VM is easier to set up as docker in LXC requires a few extra steps.
Definitely don't do one docker image per instance, the overhead on that would be insane with managing configs and updates. I can't imagine having over 100 LXC containers that I'd have to individually update and manage!
I use a Alpine Linux CTX with docker.
I run one docker container per (Debian) LXC. I know it's got layers like ogres, but I like being able to move them around with the snapshot backups - this is the advantage vs having a single VM with a heap of containers running on it.
I've tried both LXCs and VMs, and I'm now in the process of migrating from an LXC to a VM for my docker containers. The biggest reason I'm migrating is security - you shouldn't run privileged LXCs in proxmox, and there are some features (gpu pass-through) I couldn't run in an LXC without it being privileged. I still run other non-docker services in LXCs wherever possible though.