Running a Docker image in PyCharm causes "Invalid volume specification"
<p>I am trying to run a project based on a Docker Image (Tensorflow, following instructions from <a href="http://www.netinstructions.com/how-to-install-and-run-tensorflow-on-a-windows-pc/" rel="nofollow">this tutorial</a>) as described in <a href="https://blog.jetbrains.com/pycharm/2015/12/using-docker-in-pycharm/" rel="nofollow">this blog</a>. The Docker is running fine, but I'm unable to import it in PyCharm (professional, does not work in community version). I get the following error message:</p>

<blockquote>
  <p>Error running main: Can't run remote python interpreter:
  {"message":"Invalid bind mount spec
  \"C:/Path-to-project/Project-name:/opt/project:rw\":
  Invalid volume specification:
  'C:/Path-to-project/Project-name:/opt/project:rw'"}</p>
</blockquote>

<p>How to solve this?</p>

<p>I solved this problem as follows:</p>

<ol>
<li>Go to: <code>File -&gt; Settings -&gt; Project -&gt; Project Interpreter -&gt; Your docker interpreter -&gt; Path mappings</code>;</li>
<li>Add row: <code>{'Local path': 'C:', 'Remote path': '/c'}</code> (replace to your drive with project; if you use this interpeter for several projects from differen drives then add them all);</li>
<li>Go to: <code>Run -&gt; Edit Configurations -&gt; Your configuration -&gt; Docker container settings -&gt; '...' -&gt; Volume bindings</code>;</li>
<li>Select row with project's binding (example: <code>{'Container path': '/opt/project', 'Host path': 'C:\Users\_username_\my_python_project'}</code>) and press '<strong>Edit</strong>'.</li>
<li>Press <code>OK -&gt; Apply -&gt; OK</code>. If first '<strong>OK</strong>' without changes did not help then replace <code>'Host path': 'C:\Users\_username_\my_python_project'</code> to <code>'Host path': '/c/Users/_username_/my_python_project'</code>;</li>
<li>Run your python configuration.</li>
</ol>

<p><strong>About</strong>:</p>

<ul>
<li>Windows 10 1607 [10.0.14393]</li>
<li>PyCharm 2016.2.3</li>
<li>Build #PY-162.1967.10, built on September 7, 2016</li>
<li>JRE: 1.8.0_102-b14 amd64</li>
<li>JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation</li>
</ul>

<p>Why PyCharm ignore <code>File -&gt; Settings -&gt; Build, Execution, Deployment -&gt; Docker -&gt; VirtualBox shared folders</code> in <code>Run -&gt; Edit Configurations</code>?</p>

python windows docker tensorflow pycharm