I use docker and I would like to know: is it possible to send a signal from a running container to another running container?
More precisely, I would like to send SIGUSR1 to a python program.
I already made a bash script to get the pid of my python process and send a signal:
send_signal.sh
#!/bin/bash
py_pid=$(pidof -s python my_programme.py
kill -SIGUSR1 $py_pid
Before that, I ran send_signal.sh from the Docker host as follows:
docker exec docker_with_python bash send_signal.sh
Or just like that:
docker kill --signal="SIGUSR1 docker_with_python
But now I would like to send a signal to the current container to another. So, how can I execute this command from another running container. Or is there another way to send a signal?
Thanks in advance
source
share