title: Allow docker container to connect to a local/host postgres database
body: <p>I've recently been playing around with Docker and QGIS and have installed a container following the instructions in <a href="http://kartoza.com/qgis-desktop-in-docker/" rel="noreferrer">this tutorial</a>.</p>
  
  <p>Everything works great, although I am unable to connect to a localhost postgres database that contains all my GIS data. I figure this is because my postgres database is not configured to accept remote connections and have been editing the postgres conf files to allow remote connections using the  instructions in <a href="http://blog.jsinh.in/how-to-enable-remote-access-to-postgresql-database-server/#.VZqPgnXInK5" rel="noreferrer">this article</a>.</p>
  
  <p>I'm still getting an error message when I try and connect to my database running QGIS in Docker: could not connect to server: <code>Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections to port 5433?</code>
  The postgres server is running, and I've edited my <strong>pg_hba.conf</strong> file to allow connections from a range of IP addresses (172.17.0.0/32). I had previously queried the IP address of the docker container using <code>docker ps</code> and although the IP address changes, it has so far always been in the range 172.17.0.x</p>
  
  <p>Any ideas why I can't connect to this database? Probably something very simple I imagine!</p>
  
  <p>I'm running Ubuntu 14.04; Postgres 9.3</p>