A long-running pgAdmin 4 container that I use as part of my local setup, where I always configure databases within a Docker Compose setup.
docker compose up -dThen open http://localhost:5050. No login (desktop mode).
Each project runs its Postgre as a container that publishes a port on the host. Register the server in pgAdmin with:
- Host:
host.docker.internal - Port: whatever the project publishes (typically
5432) - User / Database / Password: as defined by that project
The same pgAdmin instance reaches any project's database without needing to attach this container to project networks. Only one Postgres can bind a given host port at a time, so either run one project at a time or assign distinct host ports per project (5432, 5433, …).
See the comments in docker-compose.yaml for more details on the configuration.