Due to the limitation of Dcoker for Mac, host cannot directly connect to docker contaier.
Host can only connect to container if container binds itself to 0.0.0.0 network interface
I have only changed in 9.6 version so please try to use that.
This is the Git repo of the Docker official image for postgres. See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues.
The full readme is generated over in docker-library/docs, specifically in docker-library/docs/postgres.
See a change merged here that doesn't show up on the Docker Hub yet? Check the "library/postgres" manifest file in the docker-library/official-images repo, especially PRs with the "library/postgres" label on that repo. For more information about the official images process, see the docker-library/official-images readme.