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.