问题描述
抱歉,如果有人问过这个问题,但在 Docker 文档 中找不到退出代码的权威列表(也称为退出代码)地位).奇怪!我看到有关使其保持一致的建议,但 docker.com 上没有文档.
有人知道哪里可以找到退出代码吗?
对于 Docker >= 1.10 参见 这个 PR,它遵循标准的chroot 退出代码:>
125
:docker run
本身失败126
:不能调用包含的命令127
:如果找不到包含的命令128 + n
致命错误信号n
:130
=(128+2)
容器被 Control-C 终止137
=(128+9)
容器收到一个SIGKILL
143
=(128+15)
容器收到一个SIGTERM
查看signal
的手册页以获取完整列表(在cmd 上键入man 7 signal
或在线查看例如信号).
查看 Docker 的退出状态文档,了解有关当前版本.
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?
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 type man 7 signal
or check online e.g. signal).
Check Docker's exit status documentation for more information about the current version.
这篇关于Docker Run 退出代码的权威列表是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!