How to send signal to program run in a docker container?

atupal picture atupal · Sep 5, 2014 · Viewed 22.9k times · Source

I have a program run in a docker container with detached mode.

So how to send a signal such as SIGINT to this program?

Answer

Andy picture Andy · Sep 5, 2014

You can use docker kill --signal="<signal>" <container name or id> to send any signal to the root process of a given container.

See https://docs.docker.com/engine/reference/commandline/kill/#send-a-custom-signal--to-a-container