Skip to content

Instantly share code, notes, and snippets.

@tsirolnik
Last active July 21, 2018 10:38
Show Gist options
  • Save tsirolnik/61395bccab6d4334afa34a0d83f3b2dc to your computer and use it in GitHub Desktop.
Save tsirolnik/61395bccab6d4334afa34a0d83f3b2dc to your computer and use it in GitHub Desktop.
Connecting Docker Compose PostgreSQL Container to PgAdmin
  • Run your compose with docker compose up
  • Get the name of your compose network with docker network ls
    • The network name will be in the format of <project>_default unless changed
  • Run the pgadmin command
    • docker run --net <compose_network> -v pgadmin4:/home/pgadmin/.pgadmin -p 5050:5050 --link <pg_container_name>:<pg_container_name> --rm meedan/pgadmin
  • Browse to http://localhost:5050/
  • Login with - admin@pgadmin.org:pgadmin

This is based on the following sources -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment