By downloading you acknowledge and agree to the Crunchy Data Terms of Use and Data Collection Notice

  • 5.5.0-0
  • linux
  • amd64

pgAdmin4

A PostgreSQL database management user interface for both your desktop and browser

Step 1

Create a network so that the PostgreSQL and pgAdmin4 containers can communicate with each other:

docker network create --driver bridge pgnetwork

Step 2

Set up key environmental variables for working with both of the containers. This creates a user named hippo with a password of datalake that has access to a database named hippo:

cat << EOF > postgres-env.list
PG_MODE=primary
PG_PRIMARY_USER=postgres
PG_PRIMARY_PASSWORD=datalake
PG_DATABASE=hippo
PG_USER=hippo
PG_PASSWORD=datalake
PG_ROOT_PASSWORD=datalake
PG_PRIMARY_PORT=5432
EOF

cat << EOF > pgadmin-env.list
PGADMIN_SETUP_EMAIL=hippo
PGADMIN_SETUP_PASSWORD=datalake
SERVER_PORT=5050
EOF

Step 3

Run the containers container:

docker run --publish 5432:5432 \
  --volume=postgres:/pgdata \
  --env-file=postgres-env.list \
  --name="postgres" \
  --hostname="postgres" \
  --network="pgnetwork" \
  --detach \
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.1-0

docker run --publish 5050:5050 \
  --volume=pgadmin4:/var/lib/pgadmin \
  --env-file=pgadmin-env.list \
  --name="pgadmin4" \
  --hostname="pgadmin4" \
  --network="pgnetwork" \
  --detach \
registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-7.8-0

Step 4

Go to http://localhost:5050 in your local browser. Log into pgAdmin4 with your credentials, which are hippo and datalake

Step 5

Go to Servers, right click, and select Add a New Server:

  • For name, type in hippo
  • Click on "Connection"
    • For hostname, use postgres
    • For port, use 5432
    • For username, use hippo
    • For password, use datalake
    • Click Save Password

Click "Save" at the bottom.

Step 6

You should now be connected. Continue to explore pgAdmin4!

Tags

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-7.8-0

Compressed Size: 910.48