-
Notifications
You must be signed in to change notification settings - Fork 378
Remove VOLUME declaration from Dockerfile (or propose method for changing config on a remote docker host) #50
Comments
The same is true when trying to create an image with plugins. I had to go around it like this:
|
That is a serious issue that prevents people from having a stateless grafana. |
This issue also has an impact on persistent volumes in kubernetes. If you mount a persistent volume at https://plus.google.com/+AaronRoydhouse/posts/E3Ag8EPMgkp Given the age of this issue and the lack of discussion, is this a "wontfix"? |
Wanted to follow up after a few hours of work. It turns out that you can mount kubernetes volumes OVER the docker mount points and the data will end up in the kubernetes volume. So instead of mounting |
All volumes have been removed in #146. This image will be released with Grafana 5.1. |
If I use grafana-docker on a remote docker host (e.g., via docker-machine), as far as I can tell, I cannot change the grafana config files/directories without uploading those files to the remote docker host first (since volume declarations are with regards to the remote host).
With other docker images (e.g., the official nginx image), I can create a Dockerfile that extends the official image, and then use COPY commands to change the config files I want.
When I try this custom Dockerfile with grafana (i.e., that starts with
FROM grafana/grafana:latest
), my commands that change the grafana config directories have no effect. From what I understand, this is because the volumes are initialized after the Dockerfile is processed, so any changes done to the locations is overwritten when the volumes are mounted.Example of what I'm trying to do:
I'm assuming that the VOLUME command is used to prevent losing of any config changes done via the grafana web UI, but I suspect that there are only a handful of files/directories that are changed by the grafana web UI (e.g. the sql database).
I propose we remove many of the volumes from the grafana Dockerfile so that my above use-case can be accomplished. At the very least, have /etc/grafana not in there so that grafana.ini can be overwritten. THen, for the files that are changed regularly via the grafana web UI (e.g., grafana's sqlite db), continue to have a volume for these (or move the files to a new directory that doesn't conflict with grafana's config directories and make that a docker volume).
Thoughts?
The text was updated successfully, but these errors were encountered: