redis / docker-library-redis

Docker Official Image packaging for Redis
http://redis.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 563 forks source link

Switching out the user to not use root #339

Closed ck250186 closed 1 year ago

ck250186 commented 1 year ago

Not running the container as root user.

yosifkit commented 1 year ago

Initially running as root is done for ease of use to fix permissions and then the process is dropped down to the redis user:

https://github.com/docker-library/redis/blob/19f345b2056588c009396bcfc22ba9241a669491/docker-entrypoint.sh#L10-L14

Users of the image are welcome to use --user if they know that permissions are already correct for their provided data directory.

ck250186 commented 1 year ago

Got it. Thank you for letting me know @yosifkit :)