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.

  • docker-compose up didn't finish npm install.
  • I can't access mounted volume of docker-postgres from host
  • Is there any workaround for “session deleted because of page crash” Chrome error on Travis CI?
  • Docker Container to Host Routing
  • How can the current build context directory be referenced inside of a Dockerfile?
  • Use Jupyter together with file share or mounted folder
  • But when I change the Interpreter to the Remote Docker Interpreter, all I get is the following output:

    22c422193587:python /opt/.pycharm_helpers/pydev/pydevconsole.py 0 0

    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.

  • Linux / Fedora sandboxing processes and filesystem changes
  • Persistent easily-accessible storage in Docker
  • Running development server with create-react-app inside of a docker container
  • Iterate in RUN command in Dockerfile
  • Error when loading hortonworks docker image
  • Docker - Access mapr UI from host
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.