docker安装grafana
登录dockerhub查看需要的grafana版本。
1、下载grafana镜像(grafana最新版为例)
docker pull grafana/grafana:latest
2、运行容器
docker run -d -p 20004:3000 --name=grafana -v /home/deploy/grafana/data:/var/lib/grafana grafana/grafana:latest
3、查看容器日志
docker logs -f grafana
[root@localhost grafana]# docker logs -f grafana
GF_PATHS_CONFIG='/etc/grafana/grafana.ini' is not readable.
GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
4、授权目录
chmod -R 777 /home/deploy/grafana
5、重启grafana
docker restart grafana
6、访问grafana网站