I converted grafana docker image to singularity
sudo singularity build grafana.simg docker://grafana/grafana
But when I try to run it
sudo singularity run grafana.simg
I get
EROR[12-02|08:38:53] Server shutdown
logger=server reason="Service init failed: failed to connect to database: failed to create SQLite database file "/var/lib/grafana/grafana.db": open /var/lib/grafana/grafana.db: read-only file system" Service init failed: failed to connect to database: failed to create SQLite database file "/var/lib/grafana/grafana.db": open /var/lib/grafana/grafana.db: read-only file system
How can i solve that?
Since Singularity images are read-only
by default you need to specify a Bind Path .
Try creating a folder on your host for storing Grafana's data.
mkdir -p grafana/data
After this you should be able to start the container.
singularity run --bind grafana/data:/var/lib/grafana grafana.simg
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.