So what i did is:
docker run -d -e POSTGRES_USER=user -e POSTGRES_PASSWORD=456789 --name admin-service -p 5432:5432 postgres
and when i check with docker ps and docker inspect
"Networks": {
...
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
...
}
}
and docker ps:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6f1b75bed5b1 postgres "docker-entrypoint.s…" 18 minutes ago Up 18 minutes 0.0.0.0:5432->5432/tcp admin-service
i went to PgAdmin and try to connect with host: 172.17.0.2, i get connection time out, so i change hostname to localhost, it keep saying password authentication failed, i filled username and password as above. So i have no idea what i did wrong here.
localhostport5432.useras username and456789as password