shubham1172 / unshare

Python extension for C's unshare call
GNU General Public License v3.0
4 stars 2 forks source link

Include sample Container.py in docs #5

Closed hexDoor closed 2 years ago

hexDoor commented 2 years ago

Hi,

Would it be possible to get the Container.py script referenced in the README onto the repo so that it will be a little bit easier to understand how one can utilise this library?

For context: I'm working on a thesis where I am trying to create rootless containers in python to execute student submitted code and collect output/side effects for assessment purposes. Your Container.py code may help fill in some gaps i've been having when working with CLONE_NEWPID and PID 1. (unless /bin/bash is running as PID 1)

Thanks

shubham1172 commented 2 years ago

Hello @hexDoor, this is the script from the screenshot https://gist.github.com/shubham1172/7c53130e6e0258f998f331955564dc4c

This contains a slightly mature version https://github.com/shubham1172/pocket

hexDoor commented 2 years ago

Thanks for the quick response.

This is exactly what I needed to get me past my blocker :) (will need some tweaking for additional isolation and requirements but will leave a cite in my thesis)

Maybe worth placing the links in README?

shubham1172 commented 2 years ago

Thanks @hexDoor, that's a good idea, added!