Skip to content

Instantly share code, notes, and snippets.

@jjhamshaw
Created September 5, 2017 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjhamshaw/88c999b9d38e93994a94c4987e02c25e to your computer and use it in GitHub Desktop.
Save jjhamshaw/88c999b9d38e93994a94c4987e02c25e to your computer and use it in GitHub Desktop.
connect to your docker postgres container and run psql, without having to specify a container name or ID
docker exec -it $(docker ps -q --filter "name=postgres") psql -U postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment