Both OCI and linux containers are similar in cpu overhead, that is to say, negligible cpu load even on low powered ARM SBCs (you can run about the same number of things on a rpi2 in either host os or in containers, you’ll hit the RAM limit really quick if you try running more than 10 programs).
Space utilization on the other hand can be a problem. Instead 3 programs needing 80MB each and sharing a few libraries, each program will need at least 8 to 100MB more for each (depending on what rootfs distro you go for).
Using flatpak or appimage (if the program you want is even available in that format) would probably be a little more space efficient, as you don’t have to load an entire OS, but not by a long shot.
Then, there’s nix-env, the nix package manager, which has a lot of stuff and can run on any linux distro (and on macos). TBH, nix is such a wonderful thing, it’s the real universal package manager and doesn’t suffer from silly stuff like being sandboxed. NixOS is the next level after that, but I’m potentially considering running nix-env on other distros when I’m lacking stuff.
Of course, I wouldn’t recommend nixos to a beginner, but nix-env might be easier than trying to use docker. LXC is among the easiest though, especially if you are already running a GUI for managing it, like proxmox (although I find the lxd cli to be easier).And if you’re following debian documentation on how to install stuff, it should be easy.
But if you’re in a pinch for lack of a package, nix-env comes in handy even on debian (and you can still install multiple “conflicting” packages, because they each have a different path).
nix-env -qas postgresql
--S postgresql-11.20
--S postgresql-11.20
--S postgresql-12.15
--S postgresql-12.15
--S postgresql-13.11
--S postgresql-13.11
--S postgresql-14.8
--S postgresql-14.8
--S postgresql-14.8
--S postgresql-14.8
--S postgresql-15.3
--S postgresql-15.3
It’s still going to use more storage, if you don’t manage it properly and collect garbage, even more than flatpak. But if you manage it, it should take less than LXC or docker. And it doesn’t suffer from being sandboxes like flatpak or snaps, although in some scenarios you might want them so. Unfortunately, unlike lxc which has its own networking stack, you can’t use the same port for programs running in nix-env, snap or flatpak, you’d need to use a different one (although for lxc, you’d be using a different IP address, so it’s kinda cheating, but in a good way). Then, there’s nothing stopping someone from running docker in lxc using a nixos image base in docker (for truly reproducible containers, look it up).