Apologies if this has been asked, but nowhere in the Docker documentation can I find an authoritative list of exit codes (also called exit status). Surprising! I see suggestions about making it consistent, but no docs on docker.com.
Does anyone know where the exit codes can be found?
Normally it will be the exit status of the process, so it's application dependent i.e:
But in certain cases Docker itself can return an exit code:
https://docs.docker.com/engine/reference/run/#exit-status
For Docker >= 1.10 see this PR, which follows standard chroot exit codes:
125
:docker run
itself fails126
: contained command cannot be invoked127
: if contained command cannot be found128 + n
Fatal error signaln
:130
=(128+2)
Container terminated by Control-C137
=(128+9)
Container received aSIGKILL
143
=(128+15)
Container received aSIGTERM
Check the man page of
signal
for the full list (on cmd typeman signal
or check online e.g. signal).Check Docker documentation for more information about the current version.