title: Connection Refused Docker Run
body: <p>I'm getting a connection refused after building my Docker image and running <code>docker run -t imageName</code></p>
  
  <p>Inside the container my python script is making web requests (external API call) and then communicating over localhost:5000 to a logstash socket.</p>
  
  <p>My dockerfile is really simple:</p>
  
  <pre><code>FROM ubuntu:14.04
  
  RUN apt-get update -y
  
  RUN apt-get install -y nginx git python-setuptools python-dev
  
  RUN easy_install pip
  
  #Install app dependencies
  RUN pip install requests configparser
  
  EXPOSE 80
  EXPOSE 5000
  
  #Add project directory 
  ADD . /usr/local/scripts/
  
  #Set default working directory
  WORKDIR /usr/local/scripts
  
  CMD ["python", "logs.py"]
  </code></pre>
  
  <p>However, I get a <code>[ERROR] Connection refused</code> message when I try to run this. It's not immediately obvious to me what I'm doing wrong here - I believe I'm opening 80 and 5000 to the outside world? Is this incorrect? Thanks.</p>