Compare commits

...

2 Commits

Author SHA1 Message Date
7eb4e46ff3 clean 2021-02-17 14:20:25 +01:00
35e9756525 better doc 2021-02-17 14:19:28 +01:00
2 changed files with 7 additions and 8 deletions

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
``` ```

View File

@ -1,2 +0,0 @@
def func2_1():
return 'Bonjour de func2_1'