matusnovak / prometheus-smartctl

HDD S.M.A.R.T exporter for Prometheus written in Python
The Unlicense
155 stars 43 forks source link

Would it be possible to change this Dockerfile so an unprivileged user is used? #22

Open PhilipMay opened 2 years ago

PhilipMay commented 2 years ago

https://github.com/matusnovak/prometheus-smartctl/blob/3fbd7bbb06b466bfeb7c1eb99aec45a5951f1458/Dockerfile#L12

PhilipMay commented 2 years ago

Well... I think smartctl can not be used as non root user - right?

ngosang commented 2 years ago

I think "privileged" is required, but we can launch the Python code with non-root user. You can look for inspiration here => https://github.com/prometheus-community/smartctl_exporter PRs are welcome.