Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Prometheus bad permissions when using volume driver #776

Open
clayrisser opened this issue Apr 15, 2018 · 3 comments
Open

Prometheus bad permissions when using volume driver #776

clayrisser opened this issue Apr 15, 2018 · 3 comments

Comments

@clayrisser
Copy link

The Prometheus service breaks when using a custom docker volume driver. Basically, the container does not have permission to write to the /prometheus folder. This is because root permission is needed to write to that folder when using a volume driver (specifically rancher-nfs in my case). The default user for the Prometheus container is nobody, hence the write permission error.

@jriberg
Copy link

jriberg commented Apr 20, 2018

I too have the same issue - Have tried both rancher-nfs and local volume-drivers

@clayrisser
Copy link
Author

The solution is to set user to root. You can see how I did it in my docker-compose.yml file.

https://github.com/codejamninja/rancher-catalog/blob/f8a6a66bb577797b2735cbc986ba17288930608f/templates/grafana/0/docker-compose.yml#L35

prometheus:
  image: prom/prometheus:v2.1.0
  user: root
# etc . . .

@clayrisser
Copy link
Author

My pull request at the link below fixes it. Hopefully, they accept it soon.

#777

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants