I am starting a new Grafana docker instance (no migration) with the latest 5.2.4 version on ubuntu 16 and ubuntu 17 and when I add volumes I get this error
version: '3' services: grafana: image: grafana/grafana:5.2.4 volumes: - ..grafana-storage:/var/lib/grafana
docker-compose up Starting grafana_grafana_1 ... done Attaching to grafana_grafana_1 grafana_1 | GF_PATHS_DATA='/var/lib/grafana' is not writable. grafana_1 | 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 grafana_1 | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied grafana_grafana_1 exited with code 1
tried setting user 472 104 and all but nothing worked ref.
reinstall docker ce didn’t work too ref,
if you are running docker with root rights then follow the accepted answer but use the id as 0 (sudo id -u instead of id -u)