I see that I\'m not the first one to ask the question but there was no clear answer to this:
How to use pdb with docker-composer in Python development?
W
Use the following steps to attach pdb on any python script.
Step 1. Add the following in your yml file
stdin_open: true tty: true
This will enable interactive mode and will attach stdin. This is equivalent for -it mode.
Step 2.
docker attach
You'll now get the pdb shell