title: Can't manage to build and run a bottle.py app
body: <p>I've been trying to setup a container to run an app with the bottle framework. Read everything I could find about it, but even so I can't do it. Here's what I did:  </p>
  
  <p><strong>Dockerfile:</strong>  </p>
  
  <pre><code># Use an official Python runtime as a parent image
  FROM python:2.7
  
  # Set the working directory to /app
  WORKDIR /app
  
  # Copy the current directory contents into the container at /app
  ADD . /app
  
  # Install any needed packages specified in requirements.txt
  RUN pip install -r requirements.txt
  
  # Make port 80 available to the world outside this container
  EXPOSE 8080
  
  # Define environment variable
  ENV NAME World
  
  # Run app.py when the container launches
  CMD ["python", "app.py"]
  </code></pre>
  
  <p><strong>app.py:</strong>  </p>
  
  <pre><code>import os
  from bottle import route, run, template
  
  @route('/&lt;name&gt;')
  def index(name):
      return template('&lt;b&gt;Hello {{name}}&lt;/b&gt;!', name=name)
  
  run(host='localhost', port=8080)
  </code></pre>
  
  <p><strong>requirements.txt</strong>  </p>
  
  <pre><code>bottle  
  </code></pre>
  
  <p>By running the command <code>docker build -t testapp</code> I create the container.<br>
  Then by running the command <code>docker run -p 8080:8080 testapp</code> I get this terminal output:  </p>
  
  <p><code>Bottle v0.12.13 server starting up (using WSGIRefServer())...
  Listening on http://localhost:8080/
  Hit Ctrl-C to quit.</code>  </p>
  
  <p>But when I go to <code>localhost:8080/testing</code> I get <code>localhost refused connection</code>.  </p>
  
  <p>Can anyone point me to the right direction?</p>