Trap the sigterm during the stop of a container
See original GitHub issueHi,
I would like to know if with dumb-init it’s possible to trap the sigkill to be able to do something else during the stop of the container ?
I used keepalived and two process was created but the second one doesn’t have the pid 1 for parent so it’s not killed correctly.
root 7711 1 0 18:15 ? 00:00:00 keepalived -P xxx
root 7714 7711 0 18:15 ? 00:00:00 keepalived -P xxx
Regards,
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Trapping signals in Docker containers | by Grigorii Chudnov
One common signal is SIGTERM that tells the process to shut down and terminate. It could be used to close down sockets, database...
Read more >Trapping Signals in Docker Containers | Cloudbees Blog
One common signal is SIGTERM, which tells the process to shut down and terminate. It could be used to close down sockets, database...
Read more >Trap termination signal (SIGTERM) sent to the container ...
Cloud Run sends a SIGTERM signal to your container instance before the container instance terminates, due to an event like scale down or...
Read more >trapping signal from "docker stop" in bash - Stack Overflow
The STOPSIGNAL sets the system call signal that will be sent to the container to exit. This signal can be a valid unsigned...
Read more >Docker - Trapping Signals inside a Container
The docker stop command attempts to stop a running container first by sending a SIGTERM signal to the root process ( ie. process...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@devTechi You can consider looking at the latest version of it if you like it : https://github.com/ceph/ceph-container/blob/master/src/daemon/docker_exec.sh
@devTechi thanks for the feedback, glad it helped some