1. Find IP of a PostgreSQL database running as a docker container
Run docker inspect <name-of-container>
.
"NetworkSettings": {
...
"Networks": {
"name_of_your_database": {
...,
"IPAddress": "172.18.0.2",
...
},
...
}
}
}
Next you can use the IPAddress from above to connect to your database using pgadmin.
2. View logs from a running docker container
In order to tail logs from inside a docker container.
Run docker logs --follow <name-of-your-container>
Top comments (0)