1. System environment
Centos 6.5 (Host) docker 1.7 centos(6.8) Mirror
When looking at the docker container, I found that the state of the container seemed a little different and a little confused.
In the status in the doc ps-a echo message:
There are several exit states for docker containers:
Exit (0), exit (1), exit (2), exit (127), exit (137), etc.
There is only one question: Do you want to execute command return codes in linux in docker?
0 means normal exit. Other representatives quit abnormally.
Is there any detailed explanation to explain the difference between these exit states?
All Docker container runs specify a run command, which is the start command of the main process in the container. The exit code in the container exit state is actually the exit code of this process. In other words, the exit code in Docker can be directly equated with the Linux execution return code.