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
You have to expose the postgres port in the container to you local system. You do this by running your container like this:
docker run -p 5432:5432
when connecting with your GUI client or CLI make sure to use the ip-address not localhost even if your ip-address is the localhost ip-address.
docker ps
would give you the ip address your postgres container is on.