title: Docker: curl: (7) Failed to connect to localhost port 9089: Connection refused
body: <p>I am trying to connect to my IAM server by using:</p>
  
  <blockquote>
    <p>curl -i -X  POST -H "Content-type: application/json"
    <a href="http://localhost:9089/account/list" rel="noreferrer">http://localhost:9089/account/list</a> -d '{"jwt": "jwt_token..."}'</p>
  </blockquote>
  
  <p>and in doing so I get an error as follows:</p>
  
  <blockquote>
    <p>curl: (7) Failed to connect to localhost port 9089: Connection refused</p>
  </blockquote>
  
  <p>Any suggestions would be greatly appreciated!</p>
  
  <p>Edit:</p>
  
  <pre><code> &gt; npm info it worked if it ends with ok npm info using npm@5.3.0 npm
      &gt; info using node@v8.5.0 npm info lifecycle iam@1.0.2~prestart:
      &gt; iam@1.0.2 npm info lifecycle iam@1.0.2~start: iam@1.0.2
      &gt; 
      &gt; &gt; iam@1.0.2 start /usr/src/app
      &gt; &gt; node server.js
      &gt; 
      &gt; HTTP listening on port 9089 HTTPS listening on port 9449
  </code></pre>
  
  <hr>
  
  <pre><code>root@Ubuntu1604-001:/home/src/IAM# docker images
  REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
  blandry/2           latest              f127789f2de7        4 days ago          544MB
  blandry/3           latest              f127789f2de7        4 days ago          544MB
  </code></pre>
  
  <hr>
  
  <pre><code>root@Ubuntu1604-001:/home/src/IAM# docker ps
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                     NAMES
  cc28d00d1667        blandry             "npm start"         33 minutes ago      Up 33 minutes       0.0.0.0:32768-&gt;9089/tcp   objective_mclean
  </code></pre>
  
  <hr>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM node:8.5.0-wheezy
  RUN apt-get update
  
  WORKDIR /usr/src/app
  ENV ldap_port 389
  ENV http_port 9089
  
  ENV ladp_ip 10.119.226.149
  ENV URL  10.119.226.149
  ENV authentication eyJhbGciOiJIUz...
  
  COPY package.json package-lock.json /usr/src/app/
  COPY . .
  
  EXPOSE 9089
  CMD ["npm", "start"]
  </code></pre>