title: Pycharm Docker port bindings
body: <p>I'm running a flask application within a Docker container so I need to bind the host and container port (in this case port 5000 in both).</p>
  <p>Running this command:</p>
  <pre><code>docker run -v //c/Users/Nicholas/PycharmProjects/flask_tutorial:/opt/project -e &quot;FLASK_APP=/opt/project/flaskr.py&quot; -p 0.0.0.0:5000:5000 flask flask run --host=0.0.0.0
  </code></pre>
  <p>spins up the container and I can access the app at 127.0.0.1:5000 locally on my browser. However after entering these same settings into the Pycharm (2016.2.3) run configuration GUI and starting the container I cannot access the app (I have tried ticking the &quot;Publish all ports&quot; option to no avail):</p>
  <p><img src="https://i.stack.imgur.com/RUXDF.png" alt="pycharm docker run configuration" /></p>
  <p>Using <code>docker inspect container_id</code> with the command line created container, I get these settings under NetworkSettings:</p>
  <pre><code>&quot;Ports&quot;: {
      &quot;5000/tcp&quot;: [
          {
              &quot;HostIp&quot;: &quot;0.0.0.0&quot;,
              &quot;HostPort&quot;: &quot;5000&quot;
          }
      ]
  },
  </code></pre>
  <p>However with Pycharm run configuration created container, it doesn't appear to have passed on the port bindings:</p>
  <pre><code>&quot;Ports&quot;: {},
  </code></pre>
  <p>Is there a way to check the options Pycharm is passing to Docker? Or to make it correctly pass on the port binding options?</p>
  <p>I'm on Windows 10 and Docker is running on Hyper-V (not VirtualBox)</p>