tpotce/docker/tanner/redis/Dockerfile

27 lines
529 B
Text
Raw Normal View History

2024-12-05 18:32:20 +00:00
FROM alpine:3.20
2019-08-16 14:43:10 +00:00
#
2018-05-26 23:09:31 +00:00
# Include dist
2022-03-08 23:36:03 +00:00
COPY dist/ /root/dist/
2019-08-16 14:43:10 +00:00
#
2024-09-11 10:42:17 +00:00
# Install packages
2024-12-05 18:32:20 +00:00
RUN apk --no-cache -U upgrade && \
apk --no-cache -U 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 && \
2024-09-11 10:42:17 +00:00
rm -rf /root/* \
/tmp/* \
/var/tmp/* \
/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
2024-09-05 19:49:52 +00:00
CMD ["redis-server", "/etc/redis.conf"]