add: readme +first commit with commend explanation

This commit is contained in:
xdrm-brackets 2018-02-16 10:24:40 +01:00
parent 0f9beddeb5
commit aea9ee2ddc
1 changed files with 67 additions and 0 deletions

67
README.md Normal file
View File

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