I do wonder sometimes if (you're willing to stick to Java then) you could use OSGI and get a lot of the same benefits. But I never went that far into OSGI to really know, and I like SQLAlchemy too much these days!
OSGI is bloated and pretentious, just use the classloader, it takes 300 lines of code and you have the best container in the world, see my Archive class:
I must have been tired. I meant I don't want to only use Java, and thus I can't use OSGI (or the classloader - I'm sure you're right); Docker and k8s are definitely good for allowing you to use whatever tools you like.
https://github.com/tinspin/rupy/blob/master/src/se/rupy/http...
What does SQLAlchemy have to do with containers?