exited with code 0 docker

The answer is actually the first comment. I'll explain Miguel's comment a bit.

First, we need to understand that a Docker container runs a single command. The container will be running as long as that process the command started is running. Once the process is completed and exits then the container will stop.

With that understanding, we can make an assumption of what is happening in your case. When you start your dvpt service it runs the command mkdir /root/essai/. That command creates the folder and then exits. At this point, the Docker container is stopped because the process exited (with status 0, indicating that mkdir completed with no error).


run your docker in background with -d

$ docker-compose up -d

and on docker-compose.yml add:

mydocker:
    tty: true