redis / Dockerfile
Fuegovic's picture
Update Dockerfile
7ac42df
raw
history blame
842 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
RUN mkdir -p /var/log/redis
RUN chmod -R 777 /var/log/redis
# Get the configuration file from the secret
# RUN --mount=type=secret,id=REDIS_CONFIG,dst=/etc/redis/redis.conf \
# if [ -f /etc/redis/redis.conf ]; then \
# cat /etc/secrets/REDIS_CONFIG > redis.conf \
# && chmod 777 tokens.json; \
# fi
# Get config.json
# RUN --mount=type=secret,id=REDIS_CONFIG,dst=/etc/redis/REDIS_CONFIG \
# cat /etc/secrets/REDIS_CONFIG > redis.conf && chmod 777 redis.conf
COPY redis.conf /etc/redis/redis.conf
# Run the Redis server as the main process with the configuration file
CMD ["redis-server", "/etc/redis/redis.conf"]