Skip to content

Allow a new environment variable to change the UID of the docker #223

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

Closed
wants to merge 1 commit into from

Conversation

JGodin-C2C
Copy link

What does this Pull request solve ?

In some configurations, the UID is forced to be in a certain random range for security purpose. This could lead to some troubles for redis to run and if it needs to write on the disk with only write access to the user the container orchestrator choose for it.

How to solve this problem ?

As you can see, if the variable FORCE_DAEMON_UID is passed to the container, it will relabel the redis user with this UID and change all the files that belongs to the old redis UID to the new redis UID

Regards

@tianon
Copy link
Contributor

tianon commented Feb 5, 2020

See #48 for where we added support for running the image with an arbitrary --user value (which has an equivalent in docker-compose.yml, kubernetes pod specs, etc).

@JGodin-C2C
Copy link
Author

Yes, you are right, sorry for the overhead :(

@JGodin-C2C JGodin-C2C closed this Feb 6, 2020
@denilsonsa
Copy link

If anyone came to this issue and doesn't know how to set a --user through the docker-compose.yaml, just add: user: 1001:1001 (format is UID:GID, 1001 is an example)

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.

3 participants