部署 Python Docker 容器并成功执行脚本后,容器崩溃并在显示以下错误消息后循环重启:
2017-06-19 13:22:49 [APP/PROC/WEB/0] OUT Exit status 0
2017-06-19 13:22:49 [CELL/0] OUT Exit status 0
2017-06-19 13:22:49 [CELL/0] OUT Destroying container
2017-06-19 13:22:49 [API/0] OUT Process has crashed with type: "web"
2017-06-19 13:22:49 [API/0] OUT App instance exited with guid 85e7922e-5a0c-4430-994a-324e5abc0c14 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* Codependent step exited\n* cancelled", "crash_count"=>1, "crash_timestamp"=>1497871369566402154, "version"=>"b9800e3a-b057-4cc5-b7e4-c01f9b3c6594"}
在本地执行相同的 docker 映像不会引发任何错误。我执行的 Python 脚本正在执行一个简单的打印命令,我什至为执行后发送到容器中的 SIGTERM 信号实现了一个处理程序。