FROM alpine:3.20 # Install Redis and its dependencies RUN apk add --no-cache \ redis && \ rm -rf /var/cache/apk/* # 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"]