Docker Tips n’ Tricks for Devs – #0001 – 3 Second to Postgresql

Linux Containers

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.

[sourcecode language=”bash”]
docker pull postgres:latest
docker run -p 5432:5432 postgres
[/sourcecode]

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
  • Password:

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.