mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-11-01 10:38:02 +00:00
[database] make Redis process runs as non-root user (#16326)
Why I did it Running the Redis server as the "root" user is not recommended. It is suggested that the server should be operated by a non-privileged user. Work item tracking Microsoft ADO (number only): 15895240 How I did it Ensure the Redis process is operating under the 'redis' user in supervisord and make redis user own REDIS_DIR inside db container. How to verify it Built new image, verify redis process is running as 'redis' user and all containers are up. Signed-off-by: Mai Bui <maibui@microsoft.com>
This commit is contained in:
@@ -99,4 +99,6 @@ TZ=$(cat /etc/timezone)
|
||||
rm -rf /etc/localtime
|
||||
ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
|
||||
chown -R redis:redis $REDIS_DIR
|
||||
|
||||
exec /usr/local/bin/supervisord
|
||||
|
||||
Reference in New Issue
Block a user