title: Cannot connect to fast api server at localhost:8000 from my application which is running under a docker container
body: <p>I a newbie to working with fastapi. I have a main.py inside docker container.When I connect to fastapi using</p>
  <pre><code>uvicorn main:app —-reload 
  </code></pre>
  <p>from my container.I am prompted to connect to <a href="http://127.0.0.1:8000" rel="nofollow noreferrer">http://127.0.0.1:8000</a>. On copying the address to Firefox I am getting the error:</p>
  <pre><code> unable to connect. 
  </code></pre>
  <p>How can I connect to fastapi server ?</p>
  <p>P.S The git branch I am working from was developed by another colleague so I have little to no idea how was fastapi was set up inside the docker</p>