Configure PyCharm interpreter with docker-compose inside Vagrant

Viewed 1556

I have a basic vagrant box, with docker and docker-compose running in it. The docker-compose.yaml has a web service like this:

web:
  restart: always
  build: .
  ports: 
    - "5000:5000"
  expose:
    - "5000"
  links:
    - postgres:postgres
  volumes:
    - .:/usr/src/app/
  env_file: .env
  command: python manage.py runserver
#below the postgres service is defined

Vagrantfile:

Vagrant.configure(2) do |config|

  config.vm.box = "phusion/ubuntu-14.04-amd64"

  config.vm.network "private_network", ip: "192.168.33.69"

  config.vm.synced_folder ".", "/vagrant_data"
  # provisioning

The web service uses a Dockerfile with content: FROM python:3.5.1-onbuild

I installed the PyCharm 5.1 Professional Edition Beta 2 (build 145.256.43, March 11, 2016). I want to configure the interpreter of pycharm as the same which runs the web service.
When I try to do so, in the "Configure remote python interpreter" dialog window, I select Docker Compose, then I add a new Docker server. When trying to add the docker server, when I put the ip of the vagrant machine + port 2376(this was the default in the input field) I get an exception:
screenshot

Are there any gotchas I am missing?

1 Answers
Related