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 stop_signal: SIGKILL
tty: true tty: true
ports: ports:
- "127.0.0.1:6379:6379" - "127.0.0.1:6379:6379"
image: "dtagdevsec/redis:2203" image: "dtagdevsec/redis:2203"
read_only: true read_only: true

View file

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