Normally it will be the exit status of the process, so it's application dependent i.e:
$ docker run debian sh -c "exit 5;"
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7fcc37778df0 debian "sh -c 'exit 5;'" 4 seconds ago Exited (5) 3 seconds ago reverent_einstein
But in certain cases Docker itself can return an exit code:
- 125 if the Docker daemon has an error (e.g. a wrong flag is provided)
- 126 if the container command can't be invoked (e.g. file isn't executable)
- 127 if the container command can't be found (e.g. wrong path to binary)
https://docs.docker.com/engine/reference/run/#exit-status
docker run -v non_existent_directory
or perhapsdocker run improper_container_path
There is a lot that can go wrong, and the exit code should reflect this. – Cocytus