=>=> naming to docker.io/library/c_hello_world-hello_world
ERRO[0021] error waiting for container:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./run.sh": stat ./run.sh: no such file or directory: unknown
```
We see an error at the end of the command which is perfectly normal. We did not create the `run.sh` file et (let's leave that for later).
We then need to focus on the `docker-compose.yml` file which will take care of all the hard work
needed if complex workflows are required. Here it is as simple as possible and should contain
```yml
services:
hello_world:
container_name:hello_world
build:
context:./
dockerfile:Dockerfile
volumes:
-hello_world_volume:/result# <hello_world_volume> must be the same as below but
# the name may be arbitrary. This volume must be
# present in the dojo_assignment.json file under the field
# "result": {
# "volume": "hello_world_volume",
# ...
# }
volumes:
hello_world_volume:
```
In this file, we see the definition of a `hello_world_volume` this is an arbitrary name and can be changed but it
must be coherent in this file and in the `dojo_assignment.json` file (more on this later configuration file in [The dojo configuration file](#the-dojo-configuration-file)).
This volume is responsible of mounting `/result/` directory which will contain all
the output generated by our assignment (again the name can be changed). In particular
in this director e will be required to create a `dojo_assignment.json` file
that contains at least if the assignment was successfully performed (more on that at the end of the [Creating the assignment files](#creating-the-assignment-files) section).
## The dojo configuration file
The `dojo_assignment.json` file contains the general configuration of the assignment.
The important configuration parameters are:
- the *immutable files* which are files that will be overwritten when the compilation pipeline is run (even if the student
modifies these files the modifications will not be taken into account),
- the *results* which is the volume corresponding to the `docker-compose.yml` file.
In its default form `dojo_assignment.json` file contains
```json
{
"dojoAssignmentVersion":1,
"version":1,
"immutable":[
{
"description":"Dockerfile of the unique container",
"path":"Dockerfile",
"isDirectory":false
}
],
"result":{
"container":"hello_world",
"volume":"hello_world_volume"
}
}
```
Here we see only one immutable file which is the `Dockerfile` (the `isDirectory` field is `false` but it is possible to make
complete directories immutable) and we see that:
* the value of the `container` field (`hello_world`) corresponds to
the value of the `container_name` field in the `docker-compose.yml` file,
* the value of the `volume` field (`hello_world_volume`) corresponds to the `volumes` field in the `docker-compose.yml` file.
This file will be completed in [The immutable files](#the-immutable-files) sectino with the files of our assignment that will be
created in the [next section](#creating-the-assignment-files).
## Creating the assignment files
For this assignment we will create the following files with the following content: