I'm quite new to the docker images, containers and all the logic behind linking the running containers together, so please be patient if this question sounds too stupid.
I'm trying to setup a working DB (PostgreSQL) server on Google Container Engine service and connect to it from other docker images running on same cluster.
I have setup a google cloud project, enabled cloud container API, created container cluster and ran postgres official Docker images postgres:latest. So far so good.
And here comes the issue: When I attach a root bash console to the running instance, I can connect via psql command without a problem.
But when I try to connect to it from different machine (even after enabling external access to the service and letting it through the firewall (ping command works from my local machine), every access fails with this error message:
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
I'm connecting via classic:
psql -h xxx.xxx.xxx.xxx -U myuser -W -d somedatabase
Does someone has an idea why this won't work?