From aea9ee2ddc502244e816b30a869676ad02facdad Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 16 Feb 2018 10:24:40 +0100 Subject: [PATCH] add: readme +first commit with commend explanation --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e36982a --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# PTUT Virtual Environment + + +## Requirements + +You need a consistent Linux System with the following packages : +- `docker` +- `make` +- `cpp` (C pre-processor) + + +## Commands + +In order for the environment to be launched, we need to run configuration commands, installation instructions, etc and store the final state in a **docker image**. Then we can launch several **containers** from that initial image. + +The building process is automated with the *Makefile* and the `make` command. + +--- +### 1. Build the Dockerfile + +```bash +make build +``` + +- Creates the *Dockerfile* using the *c pre-processor* to include the files in `docker/include` in `docker/main`. The final output is located at the root of the repository in `./Dockerfile`. + +--- +### 2. Create the docker image + +```bash +make image +``` + +- Creates the **docker image** from the Dockerfile. If `./Dockerfile` is missing, it will automatically launch `make build`. + +--- +### 3. Launch the container + +```bash +make run +``` + +- Builds the image (*make image*) +- Launches the container (*make run*) + +--- +### 4. Properly kill a container + +```bash +make kill +``` + +- Properly kills a running container + + +--- +### 5. Launch the CI loop + +```bash +make boot +``` + +- Launches an infinite loop that + 1. Updates the git repository (*git pull*) + 2. Builds the image (*make image*) + 3. Launches the container (*make run*) + 4. When the container stops, delete it and reloop \ No newline at end of file