Path /opt/dremio/data is not writable when try to run persist dremio docker

I am trying to run dremio docker with persist data,

I found this thread

But when I run docker run --rm -v /tmp/dremio:/opt/dremio/data dremio/dremio-oss

it fails with this line

2019-08-01 02:12:47,994 [main] ERROR ROOT - Dremio is exiting. Failure while starting services.
java.io.IOException: path /opt/dremio/data is not writable.

what did I do wrong ? any pointer to a docker-compose file i can use ?

Thanks much
Marvin

I figure it out, using docker volume container resolved this problem

if any one interested, docker-compose.yml i have used to make it work

version: ‘3’
services:
dremio:
image: dremio/dremio-oss:3.2.4
hostname: dremio
volumes:
- db-data:/var/lib/dremio
- ./localFiles:/localFiles
- db-data:/opt/dremio/data
ports:
- “9047:9047” # UI (HTTP)
- “31010:31010” # ODBC/JDBC clients

volumes:
db-data: