I need to develop backend for programming competition.
Users submit their codes to the server and we want to run codes in the sandbox, so they won't be able to affect neither the server nor each other.
The question has two parts:
1. Is that correct, that each time I want to score user's solution I need (roughly) to:
#!/usr/bin/python3
c = lxc.Container("apicontainer")
c.create("download", lxc.LXC_CREATE_QUIET, {"dist": "ubuntu",
"release": "trusty",
"arch": "i386"})
c.start()
c.execute('score_solution_script_inside_container')
c.shutdown()
c.destroy()
or c.clone(...)
Well but executing the above mentioned seems to take quite a while, so is it the way or not?
2. Should I use LXC for my purpose or should I use Docker?
I am afraid this question to be put on hold because of this second part, but I've read several SO-questions about the differences between lxc and Docker and it is still confusing for me.