Inception/srcs/requirements/redis/Dockerfile
2025-05-22 12:33:13 +02:00

24 lines
382 B
Docker

FROM alpine:3.20
# Install Redis and its dependencies
RUN apk add --no-cache \
redis && \
rm -rf /var/cache/apk/*
ARG HOST_UID
# Expose the default Redis port
EXPOSE 6379
# Set the working directory
WORKDIR /data
# Set Redis to run as a non-root user (optional)
RUN chown -R redis:redis /data
USER redis
# Start Redis server
CMD ["redis-server", "--protected-mode", "no"]