title: coult not connect to server when running from docker
body: <p>I have a python code which connect to <code>postgres</code>:</p>
  <pre><code>import psycopg2
  def start_connection(host, port, name, user, pass):
     connect = psycopg2.connect(host=host, port=port, database=name, user=user, password=pass)
     return connect
  </code></pre>
  <p>when running the code from my development computer with same parameters, I can connect to postgres DB.</p>
  <p>I built a docker of my application (which contains this code)</p>
  <p>when I run the docker (<code>docker run my_docker:1</code>)
  I'm getting error:</p>
  <pre><code>psycopg2.operationalError could not connect to server connection timeout
  Is the server running on host &quot;184.32.99.17&quot; and accepting TCP/IP connection on port 5432 ?
  </code></pre>
  <p>Why I can connect when running from my developing computer and can't do so when running from docker ?
  What do I need to fix it ?</p>
  <p>Note:
  I check and I have ping to the DB from the location the docker is running</p>