No matter if I do SIGTERM, SIGINT or SIGQUIT, debugpy seems to completely ignore the stop signals. I’m attempting to run this command inside of a Docker container:
pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5679 main.py
It starts up flawlessly, no issues whatsoever and functions as expected. But when I stop the container, it takes 10 seconds to do so, and after that Docker forces it to shutdown. Without debugpy, it stops gracefully with no issues whatsoever.
What is causing this problem, do I have to make a separate Dockerfile and call SIGKILL for the debug instances?
Source: Docker Questions