tpotce/docker/tanner/redis/Dockerfile

25 lines
482 B
Text
Raw Normal View History

2022-02-25 13:47:00 +00:00
FROM alpine:3.15
2019-08-16 14:43:10 +00:00
#
2018-05-26 23:09:31 +00:00
# Include dist
ADD dist/ /root/dist/
2019-08-16 14:43:10 +00:00
#
2022-02-17 01:26:10 +00:00
# Setup apk and redis
2022-02-25 13:47:00 +00:00
RUN apk -U --no-cache add redis shadow && \
2018-05-26 23:09:31 +00:00
cp /root/dist/redis.conf /etc && \
2019-08-16 14:43:10 +00:00
#
2022-02-17 01:26:10 +00:00
# Setup user and group
groupmod -g 2000 redis && \
usermod -u 2000 redis && \
#
2018-05-26 23:09:31 +00:00
# Clean up
2022-02-17 01:26:10 +00:00
apk del --purge \
shadow && \
2018-05-26 23:09:31 +00:00
rm -rf /root/* && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/cache/apk/*
2019-08-16 14:43:10 +00:00
#
2020-02-27 10:35:50 +00:00
# Start redis
2018-09-11 12:19:26 +00:00
STOPSIGNAL SIGKILL
2022-02-17 01:26:10 +00:00
USER redis:redis
2018-05-26 23:09:31 +00:00
CMD redis-server /etc/redis.conf