Couldn't get docker metabase application db connected to postgres with SSL

I'm trying to connect my metabase run in docker with a remote postgres db with SSL. Here's the docker log:

 Unable to connect to Metabase postgres DB. {}
Caused by: org.postgresql.util.PSQLException: Could not open SSL root certificate file /path/on/host/server-ca.pem.

The script I'm running is:

sudo docker run -d -p 3000:3000 -e "MB_DB_CONNECTION_URI=postgresql://<host>:<port>/metabaseappdb?sslmode=verify-ca&ssl=true&sslrootcert=/path/on/host/server-ca.pem&sslcert=/path/on/host/client-cert.pem&sslkey=/path/on/host/client-key.pk8&user=user&password=password" --name metabase metabase/metabase 

I'm confused that since I'm able to connect the postgresql with the SSL certificates with psql:

psql -d "postgresql://<host>:5432/metabaseappdb?sslmode=verify-ca&ssl=true&sslrootcert=/path/on/host/server-ca.pem&sslcert=/path/on/host/client-cert.pem&sslkey=/path/on/host/client-key.pk8&user=user&password=password"

By definition, host means the server which runs metabase docker container.

What went wrong with the command I ran? Where should I put my SSL certificates on the host, or how do I improve with the docker run command? Thank you!

Just figured it out. It requires mounting volume with -v option. It may also requires --user for the privilege to access client-key.pk8.