-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Teardown command? #472
Comments
Hey, thanks for the report.
Does it stop the container when you press ctrl+c? Testing with a mysql image, it ignores every ctrl+c when in interactive mode. |
Investigated this for a bit. I imagine docker is adapting its behaviour when it's not running from a TTY, in which case to stop the container/clean shutdown, the options are
Sounds like a teardown command is the best option. |
I'm trying to run a docker container along with a node.js server, and I would like to stop the container when the user stops the node.js server script.
Unfortunately Docker doesn't properly shuts down the container when CTRL+C is pressed, even though it does it when I run the docker command directly.
Would it be possible to add a
--teardown
option that allows to specify a script to run when the process is interrupted (CTRL+C is pressed)?The text was updated successfully, but these errors were encountered: