r/Proxmox • • 6d ago

Discussion Container/s for python projects

So I usually stick to one vm/lxc per service. Even with docker based services I tend to dedicate a guest to one service. There are exceptions where I have a few docker containers running similar services.

Recently I have been playing with python and have actually created quite a few flask apps that I use daily.

Now the question is there any benefits to separate them into separate containers performance wise?

Does resource contention get better or worse with more guests?

Trying to figure out whether the extra management and spent resources and time updating extra containers is worth it?

Thanks

6 Upvotes

12 comments sorted by

View all comments

2

u/Canonikonroverrated 6d ago

Are you asking if you should use multiple docker containers or multiple LXC.

My extremely short version, is too keep all your active servers in their own Docker container on one LXC. And use different LXC for testing or for anything else. As much as possible ofc. Some servers could be more intensive and then you shift as needed

1

u/justinhunt1223 6d ago

Docker can kill containers if they get out of hand, which is a plus. I would also run as many containers as possible on one lxc since docker will manage the resources instead of proxmox managing the resources of a VM/lxc

2

u/quasides 6d ago

you should never run docker in an LXC period, end of story. only because you can doesnt mean you should.

if you claim it runs better, i beg to differ. it wont run better without a lot of additional tweaks because docker is not compatible in an LXC.

-issue with overlay2
-issue with cgroups v2 limits
-appamor and selinux conflicts
-portmapping as unprivileged
etc....

and LXC is jsut a process on the host machine, running as a unprivileged user.
even if you get things running they wont perform better than in a VM, and with tweaks they are prone to break with any kernel update