title: How to debug an application running in Docker with IntelliJ?
body: <p>I have a Jetty application running in docker. I would like to debug this application using my local IntelliJ. I am on v 14.1, so I have installed the Docker Integration plugin.</p>
  
  <p>Under Clouds, I am using the default values that showed up when I click on the '+'. IntelliJ docs say this should be OK. Here the </p>
  
  <pre><code>API URL: http://127.0.0.1:2376
  Certificates folder: &lt;empty&gt;
  </code></pre>
  
  <p>I'm not sure what these are used for, so I dont know if these values are right.</p>
  
  <p>Under Run/Debug configurations, I am using Docker Deployment, and the following values:</p>
  
  <pre><code>Deployment: Docker Image
  Image ID: The docker image ID 
  Container name: The name of the container
  </code></pre>
  
  <p>When I try to run this, I get 
      javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to <a href="http://127.0.0.1:2376">http://127.0.0.1:2376</a> [/127.0.0.1] failed: Connection refused</p>
  
  <p>Obviously the API URL value I am using is incorrect. Any suggestions on what that value should be?</p>
  
  <p>My debugging options are: </p>
  
  <pre><code> -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n -Djava.compiler=NONE
  </code></pre>