Pycharm 2017.1 EAP Python Console and Remote Docker Interpreter not working together
I’ve created a Pure Python project using the minimum/docker-django-mysite image to test the Python Console feature.
I’ve tested the Python Console using a local Python Interpreter and it works properly.
But when I change the Interpreter to the Remote Docker Interpreter, all I get is the following output:
PyDev console: starting. Couldn’t connect to console process.
Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
Now, I’ve been able to docker exec a bash shell into the container while it is running (before it times out), and see that the console process has started and is listening at a random port.
Also, the Docker Log for that ephemeral container shows two numbers, one of them being the same local port where it is listening (so I guess the other is related to the expected outer host port to connect to or something like that).
Time passes, and the process and container are killed.
BTW, the Docker Container works properly for the Run/Debug configuration, so it is capable of starting a remote process.
I have been able to use pydevd to start the debug server callback from the container to the IDE, and debug code normally, so I don’t know what might be wrong.
I think that the ephemeral container is not exposing its ports, so I don’t know how the IDE expects to connect to a process on that container.
Thanks for your help.