Issue with file permissions while running Grafana container with custom image

Hi there!

I use custom Dockerfile from packaging/docker/custom/ to build image with Grafana Image Renderer plugin pre-installed (used this article).

Nevertheless, after I trying to run the container with the following image I observe this in logfile:

    GF_PATHS_CONFIG='/etc/grafana/grafana.ini' is not readable.
    GF_PATHS_DATA='/var/lib/grafana' is not writable.
    GF_PATHS_HOME='/usr/share/grafana' is not readable.
    You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
    t=2021-02-01T21:18:38+0000 lvl=info msg="Starting Grafana" logger=server version=7.3.7 commit=1e261642f4 branch=HEAD compiled=2021-01-14T08:41:57+0000
    t=2021-02-01T21:18:38+0000 lvl=info msg="Config loaded from" logger=settings file=/usr/share/grafana/conf/defaults.ini
    t=2021-02-01T21:18:38+0000 lvl=info msg="Config loaded from" logger=settings file=/etc/grafana/grafana.ini

I don’t mount folders or volumes. Just run the container with default settings.

Works fine for grafana/grafana:latest image.

Could you please help with the following?

Thanks,
Eugene

Hi Eugene,

I ran in to the same issue, and solved it by deciding I could do without images in emails. :wink:

I think what you need to do to resolve it is to exec into a running version of the container and see what the permissions on those files/directories is, and then edit the Dockerfile to ensure they are correct.
To find the correct values you can spin up a default container pulled direct from the Dockerhub.

I hope this helps somewhat.

All the best

M

This topic was automatically closed after 365 days. New replies are no longer allowed.