How run a script inside docker container?

Can’t find the file to run.
The terminal is in the same directory where the file is located, I tried it in some ways and it didn’t work:

docker exec -it postgres-12.2 psql -U postgres -f file.psql
docker exec -it postgres-12.2 psql -U postgres -f /file.psql
docker exec -it postgres-12.2 psql -U postgres -f ./file.psql