I have created an ubuntu image with nginx, php and postgres.
I want to connect the postgres database in my current image with pgadmin located on my loca
pgadmin
In my case I could solve the problem inspecting my postgre image through command
docker inspect CONTAINER_ID | grep IPAddress.
So, I used the docker ip address to config my pgadmin 4 connection and everything was fine. Thanks to @Afshin Ghazi