File size: 738 Bytes
9f560a4 f963be1 7b478c2 b2d04ca 7b478c2 57c9c73 9949b65 91e72f6 b2d04ca 9949b65 51d46d3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# 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
# 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
# Run the Redis server as the main process with the configuration file
CMD ["redis-server", "/etc/redis/redis.conf"]
|