-
Notifications
You must be signed in to change notification settings - Fork 18.8k
stopping containers before killing the daemon #22695
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
Conversation
gracefully stop the docker containers Signed-off-by: Emil Öhgren <emil.ohgren@deltaprojects.com>
Can you explain why this is needed? The daemon should stop all containers on shutdown, but after 10 (15?) seconds, it sends a KILL for those containers that failed to shutdown within that period. There's currently a PR to make that configurable, see #22566 |
if I issue a 'stop docker', all my containers is killed. works perfectly when I added my fix. is it 10s to stop ALL containers or 10s for each? real 0m0.689s logs from upstart/docker.log |
@Boolman it's 10 secon
8000
ds for each container. What is running in your container? Are they handling signals properly? If the process inside the container doesn't handle a
|
yes they handle signals properly, I run ceph and consul on these containers. yes I saw that one container in the logs is taking longer than 10s. but ALL my containers is being killed |
Docker already stops all containers on exit (with SIGTERM, then SIGKILL if SIGTERM was not handled). Closing as this is not needed. Thanks for the contribution. |
I think #22566 is the better approach for this, as it would work, independently of the process manager in use |
gracefully stop the docker containers