Go to Play with docker and login. Once logged in:
Download pgAdmin
docker pull dpage/pgadmin4
Start the pgAdmin server
docker run -p 8089:80 \
-e 'PGADMIN_DEFAULT_EMAIL=admin@admin.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=pass' \
-d dpage/pgadmin4
Download
docker pull postgres
Run the postgress db
docker run --name db -e POSTGRES_PASSWORD=pass -d postgres
Get container IP address:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' db
Login to pgAdmin with admin@admin.com
and pass
you set up ealier. Once inside add new Server create new server and add the IP address as host, your username (postgres
) and password (pass
).
That's it! Enjoy 😁