With the move from md5 to scram-sha-256 in the PostgreSQL 14.x containers, I find myself needing to set the POSTGRES_HOST_AUTH_METHOD and potentially POSTGRES_INITDB_ARGS. Seems like it would be good ...
Name the container my_postgres_container. Set the environment variable POSTGRES_PASSWORD to your_password. Run the container in detached mode (-d), so it runs in the background.