Skip to content

Instantly share code, notes, and snippets.

@jamesward
Created January 14, 2021 18:13
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 jamesward/330318217fc8e01276fae71cfc3afcba to your computer and use it in GitHub Desktop.
Save jamesward/330318217fc8e01276fae71cfc3afcba to your computer and use it in GitHub Desktop.
Postgres Docker
docker run --rm -ePOSTGRES_PASSWORD=password -p5432:5432 --name my-postgres postgres:13.1

docker exec -it my-postgres psql -U postgres

cat foo.sql | docker exec -i my-postgres psql -U postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment