Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow influxdb to run as a configurable uid/gid #389

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

brunokc
Copy link

@brunokc brunokc commented Apr 24, 2020

I wanted to configure influxdb to run under a particular uid/gid (non-root) that was different than 999:999 that comes pre-configured in the container. Using --user with docker didn't yield the desired results as it ended up not having permissions to access the data volume I supplied.

With this change entrypoint.sh still runs as root and sets things up if INFLUXDB_RUNAS_USER_ID and INFLUXDB_RUNAS_GROUP_ID variables are provided. After that, it uses gosu (if applicable) to correctly downgrade to the influxdb user and group (now set to the correct uid/gid) before running influxdb.

I did some local testing, but being my first attempt at a contribution, I'd love to hear more about how to validate this change further.

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

Successfully merging this pull request may close these issues.

1 participant