Moby: Add ability to have a shutdown hook

Created on 6 Oct 2013  ·  3Comments  ·  Source: moby/moby

It would be useful to have the ability to set a stop/shutdown hook. Much like ENTRYPOINT but for when docker stop is run. Docker stop I believe sends a SIGKILL 15 then a KILL 9 (die damn you) which pulls the rug out from under the processes. If you could set up an EXITPOINT process then it would be possible to point it at a shell script or such which could gracefully shut things down prior to container stoppage.

Most helpful comment

Shouldn't have closed this. It's not been addressed.

All 3 comments

There is work done around hooks, they will look like git hooks (drop a binary in the right directory and it'll be executed) We don't have any ETA for now, but it'll be merged.

Hooks are going to be added for other features as well, not only shutdown.

I'll close this issue now because a larger planned feature will add this and this issue isn't immediately actionable. Please feel free to comment.

Shouldn't have closed this. It's not been addressed.

Was this page helpful?
0 / 5 - 0 ratings