redis / Dockerfile
Fuegovic's picture
Update Dockerfile
b2d04ca
raw
history blame
532 Bytes
# Use the official Ubuntu 18.04 image as a base
FROM ubuntu:18.04
# Expose the default Redis port
EXPOSE 7860
# Update the system and install Redis
RUN apt-get update && apt-get install -y redis-server
# Append the commands to the Redis configuration file
RUN echo "acl setuser test >redis_password on allcommands allkeys allchannels" >> /etc/redis/redis.conf
RUN echo "requirepass password" >> /etc/redis/redis.conf
RUN echo "port 7860" >> /etc/redis/redis.conf
# Run the Redis server as the main process
CMD ["redis-server"]