redis tweaking

This commit is contained in:
t3chn0m4g3 2022-02-17 01:26:10 +00:00
parent 21d245a5d8
commit 416d4a810f
2 changed files with 10 additions and 4 deletions

View file

@ -12,7 +12,7 @@ services:
stop_signal: SIGKILL
tty: true
ports:
- "127.0.0.1:6379:6379"
- "127.0.0.1:6379:6379"
image: "dtagdevsec/redis:2203"
read_only: true

View file

@ -3,16 +3,22 @@ FROM redis:alpine
# Include dist
ADD dist/ /root/dist/
#
# Setup apt
RUN apk -U --no-cache add redis && \
# Setup apk and redis
RUN apk -U --no-cache add shadow && \
cp /root/dist/redis.conf /etc && \
#
# Setup user and group
groupmod -g 2000 redis && \
usermod -u 2000 redis && \
#
# Clean up
apk del --purge \
shadow && \
rm -rf /root/* && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/cache/apk/*
#
# Start redis
STOPSIGNAL SIGKILL
USER nobody:nobody
USER redis:redis
CMD redis-server /etc/redis.conf