pycharm can't complete remote interpreter setup for Docker
<p>I'm new to Docker. I'm using Docker &amp; docker-compose, going through a flask tutorial. The base docker image is python 2.7 slim. 
It's running on Linux. docker 1.11.2
The application is working fine. 
I want to get pycharm pro connecting to the remote interpreter, something I have never done before. </p>

<p>I followed the instructions for docker-compose. Initially it was failing because it could not connect to port 2376. I added this port to docker-compose.yml and the error went away. 
However, trying to save the configuration now stalls/hangs with a dialog 'Getting Remote Interpreter Version'. This never completes. Also, I can't quit pycharm. This happens in Pycharm 2016.2 and 2016.3 EAP (2nd). </p>

<p>The help say "SFTP support is required for copying helpers to the server". 
Does this mean I need to do something? </p>

<p>I'm not using docker-machine
The problem was that TCP access to the docker API is not established by default under ubuntu 16.04. </p>

<p>There are suggestions to enable TCP/IP access.</p>

<p>However, JetBrains gave me the simplest solution:</p>

<blockquote>
  <p>If you are using Linux it is most likely that Docker installed with
  its default setup and Docker is expecting to be used through UNIX
  domain file socket /var/run/docker.sock. And you should specify
  unix:///var/run/docker.sock in the API URL field. Please comment
  whether it helps!</p>
</blockquote>

<p>This suggestion worked with my Ubuntu 16.04 -derived distribution.</p>

<p>This goes into the Docker entry in PyCharm preferences under Build, Execution, Deployment.</p>

<p>You can also edit this while setting up a remote interpreter, but only by making a new Docker entry.</p>

<p><strong>TCP/IP Method</strong> </p>

<p>This method works if you want TCP/IP access, but this is a security risk. The socket approach is better, which is probably why it is the default.</p>

<p><a href="https://coreos.com/os/docs/latest/customizing-docker.html" rel="nofollow">https://coreos.com/os/docs/latest/customizing-docker.html</a></p>

<blockquote>
  <p>Customizing docker</p>
  
  <p>The Docker systemd unit can be customized by overriding the unit that
  ships with the default CoreOS settings. Common use-cases for doing
  this are covered below.</p>
  
  <p>Enable the remote API on a new socket</p>
  
  <p>Create a file called /etc/systemd/system/docker-tcp.socket to make
  Docker available on a TCP socket on port 2375.</p>

<pre><code>[Unit]
Description=Docker Socket for the API

[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service

[Install]
WantedBy=sockets.target
</code></pre>
  
  <p>Then enable this new socket:</p>

<pre><code>systemctl enable docker-tcp.socket
systemctl stop docker
systemctl start docker-tcp.socket
systemctl start docker
</code></pre>
  
  <p>Test that itâs working:</p>

<pre><code>docker -H tcp://127.0.0.1:2375 ps
</code></pre>
</blockquote>

<p>Once I thought to search for ubuntu 16.04 I came across simpler solutions, but I did not test them. </p>

<p>For instance:</p>

<p><a href="https://www.ivankrizsan.se/2016/05/18/enabling-docker-remote-api-on-ubuntu-16-04/" rel="nofollow">https://www.ivankrizsan.se/2016/05/18/enabling-docker-remote-api-on-ubuntu-16-04/</a></p>

<blockquote>
  <p>Edit the file /lib/systemd/system/docker.service</p>
  
  <p>Modify the line that starts with ExecStart to look like this:</p>

<pre><code>ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375
</code></pre>
  
  <p>Where my addition is the â-H tcp://0.0.0.0:2375â part. Save the
  modified file. Restart the Docker service:</p>

<pre><code>sudo service docker restart
</code></pre>
  
  <p>Test that the Docker API is indeed accessible:</p>

<pre><code>curl http://localhost:2375/version
</code></pre>
</blockquote>

python docker pycharm