TheDataStation / datastation-escrow

Apache License 2.0
1 stars 0 forks source link

Dockerizing Data Station [DO NOT MERGE] #25

Closed Dumplingz closed 1 year ago

Dumplingz commented 1 year ago

This Pull Request adds a Docker sandbox to DS. There is a new directory ds_dev_utils. However, along the process I have done some refactoring of the code, specifically in gatekeeper.py as well as in the new file ds.py.

Specifically, I have made the gatekeeper its own class, which helped docker mount onto the interceptor mount point more easily.

I have also moved all of the heavy logic besides user authentication in client_api.py into ds.py. The idea is that the whole DS system should be run using the module ds.py and the authentication is handled in client_api.py which calls functions from ds.py.

Finally, the new ds_dev_utils directory contains the docker/images directory, which currently contains a dockerfile and the necessary files that are uploaded to the docker container on startup. Importantly, setup.py is the function run when the container starts up, and it implements the server that listens for DS to send an API, then runs the API.

The jail_utils.py provides the interface to start the DS docker containers and communicate with them.