Run psql in a Docker Container

This is convenient if I already have Docker installed on the machine, but not Postgres, and I need to connect to a remote Postgres server.

docker run -it --rm postgres psql "postgresql://username:password@host/database"

source