I tried to restore a Postgres database like this:
cat backup.sql | docker run -i postgres:12 /usr/bin/psql \
-h mydb.elephantsql.com -U mydbanduser mydbanduser
This is the output:
Password for user mydbanduser:
psql: error: FATAL: password authentication failed for user "mydbanduser"
FATAL: password authentication failed for user "mydbanduser"
As can be seen, the password prompt is shown but it just steps over so I can't enter a password.