I did something like this to mount my host home directory to docker /home/pgadmin. .psqlrc defaults to user home directory which is /home/pgadmin. Can you try this once ?
I installed pgAdmin4 with the directory "/var/lib/pgadmin" mapped locally. I then set the PGADMIN_CONFIG_ENABLE_PSQL to True to be able to use the PSQL TOOL.
Now when I exit the console with "\q" I get the following error: 'could not save history to file "/home/pgadmin/.psql_history": No such file or directory'. Is it possible to map this directory as well?