-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restarting docker causes incorrect exit codes to be reported for the containers #31262
Comments
Using Docker version 1.13.1, I could not replicate the issue directly.
However, if I run the container and attach to it (
Separate tab:
I'm not sure if that is expected behavior. |
I'm not seeing this behavior on 1.13.1, however is reproducible on 1.12.6. Can you check on 1.13.1? |
@cpuguy83 I can believe that this is no longer an issue in 1.13, but is it possible to fix this in 1.12? We need more time to qualify docker 1.13 for kubernetes, and users are hitting this issue. |
@yujuhong Unfortunately no, we are not doing any new releases for 1.12. |
It was worth a try... Thanks. |
I could still reproduce this easily in Docker version:
OS:
Start a nginx container:
Restart docker daemon:
|
@Random-Liu this looks correct. Containers are shutdown when you stop docker by default. |
Closing as this appears to have been resolved in 1.13. |
@cpuguy83 You are correct. I tried Maybe nginx handles SIGTERM gracefully, and generates exit code 0. |
Description
Docker reports incorrect exit codes (0) for containers after being restarted.
Steps to reproduce the issue:
sudo service docker restart
orsudo systemctl restart docker
docker ps -a
Describe the results you received:
Describe the results you expected:
The exit code should be non-zero.
Output of docker 1.10.3:
Additional information you deem important (e.g. issue happens only occasionally):
I tested this on 3 versions: 1.10.3, 1.11.2, and 1.12.6, and only 1.10.3 reported the correct exit codes.
#26143 reported the same problem for 1.12.1, but was closed with the fix #26158. #26158 (comment) also reported the same problem in 1.12.3.
Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: