Docker Run 退出代码的权威列表是什么? [英] What is the authoritative list of Docker Run exit codes?

查看:29
本文介绍了Docker Run 退出代码的权威列表是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

抱歉,如果有人问过这个问题,但在 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 fails
  • 126: contained command cannot be invoked
  • 127: if contained command cannot be found
  • 128 + n Fatal error signal n:
    • 130 = (128+2) Container terminated by Control-C
    • 137 = (128+9) Container received a SIGKILL
    • 143 = (128+15) Container received a SIGTERM

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 退出代码的权威列表是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆