Running redis using non-root user

redis running with user redis

Signed-off-by: Qian Deng <dengq@vmware.com>
This commit is contained in:
Qian Deng 2019-07-23 09:41:33 +00:00
parent 904f04fac1
commit e62a9f1e18

View File

@ -9,6 +9,7 @@ COPY ./make/photon/redis/redis.conf /etc/redis.conf
RUN chmod +x /usr/bin/docker-entrypoint.sh \
&& chown redis:redis /etc/redis.conf
ENTRYPOINT ["docker-entrypoint.sh"]
USER redis
EXPOSE 6379
CMD ["redis-server", "/etc/redis.conf"]