better doc

This commit is contained in:
Adrian Amaglio 2021-02-17 14:19:28 +01:00
parent b590ef038b
commit 35e9756525

View File

@ -6,6 +6,12 @@ This is a very experimental tool, **it may be working**. Any suggestion or PR is
## Install docker ## Install docker
https://docs.docker.com/get-docker/ https://docs.docker.com/get-docker/
## Initialize it
The directory `config` must contain a `users.txt`, containing one username per line, or a `passwords.txt` file, containing `username=password` lines.
If you do not provide a password file, it will be generated from user file.
The password file is the database from which users/passwords are created in the system.
Aditionnaly, you can add a file named `./config/init.sh` which will be executed (as root) before starting the servers. It is usefull for debuging and customisation purposes!
## Run it ## Run it
While in this file directory, open a terminal and run the following command (the download can be very long…). While in this file directory, open a terminal and run the following command (the download can be very long…).
``` ```
@ -13,11 +19,6 @@ docker run -it --name pythonsandbox --rm --network host -v "$(pwd)"/production_e
``` ```
(Logs will flow in your terminal, CTRL+C will stop the process). (Logs will flow in your terminal, CTRL+C will stop the process).
## Initialize it
The directory `config` must contain a `users.txt` containing one username per line, or a `passwords.txt` file, containing `username=password` lines.
If you do not provide a password file, it will be generated from user file.
The password file is the database from which users/passwords are created in the system.
APermitRootLogindditionnaly, you can add a file named `./config/init.sh` which will be executed (as root) before starting the servers. It is usefull for debuging and customisation purposes!
## Use it ## Use it
You can now ssh into your localhost (and others computer on the same network can ssh into your host). You can now ssh into your localhost (and others computer on the same network can ssh into your host).
@ -25,7 +26,7 @@ Usernames and passwords are the one provided in the password file.
Students home directories are then listed in the `production_eleves` directory. Students home directories are then listed in the `production_eleves` directory.
## Debug it ## Debug it
You can open a shell in the container anytime by running this command on the docker host: You can open a shell (as root) in the container anytime by running this command on the docker host:
``` ```
docker exec -it pythonsandbox bash docker exec -it pythonsandbox bash
``` ```