Use host.docker.internal instead of 0.0.0.0. This will allow docker to decide which IP to use.
ssh - Pycharm - using remote Docker container as interpreter - Stack Overflow
python - PyCharm remote debug in a docker container - Stack Overflow
ssh - Pycharm use Docker Container Python as Remote Interpreter - Stack Overflow
Is there an equivalent of the VS Code remote development in PyCharm?
Videos
Use host.docker.internal instead of 0.0.0.0. This will allow docker to decide which IP to use.
Use a remote interpreter, this will solve a couple of issues at once. I already answered this here Rich editors in a Docker development environment
Add a remote python SDK to your IDE, this will then also resolve all the libraries being installed remotely. You will require an SSH connection to get this done though, so install sshd and use the shared developer key I outlined in my answer.
Even though this now a bit more effort, I will give you a lot better results, also in the other sections you did not yet encounter and will find, when doing just a remote-port connection.
If you still want to use the port-based debugging, see Docker: MacOSX Expose Container ports to host machine - this explains how you should understand the attach and the listen part.
I've tried searching for PyCharm remote development but I got a bit confused. It seems that there are a few ways to develop remotely. To be more specific, I want to be fully connected to a remote server and develop like I am in my local projects. The most suitable one seems to be the installation of a remote PyCharm instance but I am concerned about the resources it consumes.
Any ideas?