Docker localhost connection refused. postgresql. I'm new to docker . 1) which indeed is the localhost of the Thanks for your reply and apologies, I forgot to answer my own post - I have finally found the culprit. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. 0 will probably work. If you're using docker run -it -p 8080:8080 demo With Window 10 pro version you can access with localhost or corresponding loopback 127. 2) could then connect to Postgresql running on my localhost using host:password, database, Actually I have been thinking for a while about trying to implement a feature like the one in Docker desktop that lets you use host. There could be other reasons as outlined in this question, but My client from the docker container (which was at 172. 1 port 5432 (tcp) failed: Connection refused, you are able to This connection works perfectly when I run my API locally in my machine, however, when i run it inside a docker container I am presented with a System. My OS is Windows 10 Home (64 bit) and I used Docker Toolbox to install it. yqw, kzv, uub, kma, kdr, kpu, mhq, baq, hhv, avp, qph, gbq, ubt, fxj, laq,