Skip to content

Instantly share code, notes, and snippets.

@sotayamashita
Last active May 21, 2018 15:38
Show Gist options
  • Save sotayamashita/29f44c8e44f74a43e83887028c4397b8 to your computer and use it in GitHub Desktop.
Save sotayamashita/29f44c8e44f74a43e83887028c4397b8 to your computer and use it in GitHub Desktop.
TIL: A shortcut to get PostgreSQL interactive terminal when you are in dockerized project
docker exec -it $(docker ps -a | grep <CONTAINER NAME> | awk '{print $1}') psql -d <DATABASE NAME> -U postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment