![]() ![]() # starts grafana with your user id and using the data folderĭocker run -d -user $ID -volume "$PWD/data:/var/lib/grafana" -p 3000:3000 grafana/grafana-enterprise:8.2.1 ![]() ID=$(id -u) # saves your user id in the ID variable mkdir data # creates a folder for your data When doing so, it becomes important to start the container with a user that is able to access and write to the folder you map into the container. You may want to run Grafana in Docker but use folders on your host for the database or configuration. Run Grafana container with persistent storage (recommended) # create a persistent volume for your data in /var/lib/grafana (database and plugins)ĭocker run -d -p 3000:3000 -name=grafana -v grafana-storage:/var/lib/grafana grafana/grafana-enterprise To save your data, you need to set up persistent storage or bind mounts for your container. If you do not designate a location for information storage, then all your Grafana data disappears as soon as you stop your container. You can use the Grafana Open Source edition by changing the docker image to grafana/grafana-oss. Note: These examples use the Grafana Enterprise docker image. If you want to save your data, then you also need to designate persistent storage or bind mounts for the Grafana container. ![]() ![]() If you are running Grafana in a Docker image, then you configure Grafana using environment variables rather than directly editing the configuration file. Grafana documentation Setup Configure Docker image Configure a Grafana Docker image ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |