How to run the gateway in container without mounting the directory easily?

Hello Team,
Can anyone help me with running the docker file without the mounting -v option. I thought the gateway will still run just that the data won’t be persistent. It will be easy for people who want to quickly spin up the gateway temporarily.

When I tried to run the container using simple command without mounting /path/to/config

docker run -d -p 8080:8080 mozilla-iot/gateway:latest

I got the below error, but the folder and the db files are inside the container already,

Creating database: /home/node/.mozilla-iot/config/db.sqlite3
events.js:292
throw er; // Unhandled ‘error’ event
^

[Error: SQLITE_CANTOPEN: unable to open database file
Emitted ‘error’ event on Database instance at:
] {
errno: 14,
code: ‘SQLITE_CANTOPEN’
}

Thanks,

I rebuilt the images with a fix, so if you pull the latest, it should work better for you.

1 Like

Works like a Charm, Thanks a lot !!
Now I can spin it up easily :slight_smile:

Thank you, I was having this issue as well.