The easiest implementation of a docker container with Postgresql that I’ve found recently allows the following commands to pull and run a Postgresql server for you.
docker pull postgres:latest
docker run -p 5432:5432 postgres
Then you can just connect to the Postgresql Server by opening up pgadmin with the following connection information:
- Host: localhost
- Port: 5432
- Maintenance DB: postgres
- Username: postgres
With that information you’ll be able to connect and use this as a development database that only takes about 3 seconds to launch whenever you need it.