Docker Community Forums

Share and learn in the Docker community.

How would one design this setup in a "docker world"?

(Pulli23) #1

Well currently I have a peculiar requirement to fulfill. I need to be able to “run python scripts & commands from a trusted source on the server”.
Now since I cannot fully trust any third party like I can trust myself, I wish to run (and even store) those scripts inside a virtual machine, specific to the client.

Now I have a (nodejs based) webserver that acts as entrypoint for the clients. And as a quick and dirty approach this server just spawns a childprocess for python. and then uses stdin/stdout to pass commands.

This is obviously not safe enough. While I trust our client, I can’t trust our client to not get hacked so I need to make potentially any python code not crash the webserver.
The following idea is to let the webserver create a virtual machine (per active client) and use something like SSH to execute commands.

However this would create a (multiple of) virtual machine inside a docker.
This seems like a cardinal sin.

What approach would you suggest?