Unable to create temp file in `/tmp` for email attachments

Metabase v0.32.1

I’ m running metabase on docker. I’have created an hourly alert and am not able to get the email. I have checked the logs and this is what I found:

Error sending Pulse 68
java.io.IOException: Unable to create temp file in /tmp for email attachments

I have passed the data from previous container(metabase.db) by mounting it at /tmp. Hence, the directory is of the host. when the pulse is trying to send the email, it is not able to create temp file for attachments. Can someon let me know how to give permission of that folder to the container?

This is how I used the docker run command:
sudo docker run -d -p 3000:3000 -p 443:3001 -u $(id -u ${USER}):$(id -g ${USER})
-v ~/metabase-image:/app/plugins2
-v ~/metabase/data:/tmp
-v ~/metabase/ssl:/metabase-ssl
-e MB_DB_FILE="/tmp/metabase.db"
-e MB_JETTY_SSL_Port=“3001”
-e MB_JETTY_SSL=“true”
-e MB_JETTY_SSL_Keystore="/metabase-ssl/keystore.jks"
-e MB_JETTY_SSL_Keystore_Password=“password”
–name metabase-0-32-1 metabase32

Please don’t create multiple threads - it makes it more difficult to help:
Alerts not firing even after the confirmation mail

What does this do, doesn’t seem to be used anywhere? -v ~/metabase-image:/app/plugins2

It’s probably because you’re messing with /tmp linked to a volume.
I would probably do something like this instead:

sudo docker run -d -p 3000:3000 -p 443:3001 -u $(id -u ${USER}):$(id -g ${USER})
-v ~/metabase:/app
-e MB_DB_FILE="/app/data/metabase.db"
-e MB_JETTY_SSL_Port=“3001”
-e MB_JETTY_SSL=“true”
-e MB_JETTY_SSL_Keystore="/app/ssl/keystore.jks"
-e MB_JETTY_SSL_Keystore_Password=“password”
--name metabase-0-32-1 metabase32