Error when trying connect SQLite db via Docker

I am getting org.sqlite.SQLiteException: [SQLITE_READONLY_DIRECTORY] when trying to run metabase on Centos8 via Docker using volumes to connect it to a SQLite database which was created using .NET Core EF.

Run Command:

sudo docker run -d --name metabase --hostname metabase -v /dev/urandom:/dev/random:z,rw -v $PWD/test.db:/app/metabase.db:z,rw -p 3000:3000 metabase/metabase:latest

Database setup sudo command (after getting token and user is setup):

curl -X POST -H "Content-Type: application/json" -H "X-Metabase-Session:$session_id" -d '{"engine":"sqlite","name":"Database","details":{"db":"/app/metabase.db","advanced-options":false},"is_full_sync":true}' http://localhost:3000/api/database

Complete error:

Error in sync step Sync sqlite Database 2 'Database'
org.sqlite.SQLiteException: [SQLITE_READONLY_DIRECTORY] Process does not have permission to create a journal file in the same directory as the database and the creation of a journal file is a prerequisite for writing (attempt to write a readonly database)

Interestingly, I tried the running same command with a different test SQLite file (downloaded from a github repo) on the same directory, and it worked just fine. So I am very confused with this error.

I also opened the erroring SQLite file in an online SQLite viewer just to make the file wasn't corrupted, and it wasn't.

Things tried:

  1. Tried changing the ownership of the directory
  2. Set SELinux to permissive mode

Please let me know if anyone have any troubleshooting tips. Thanks!