Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -7,11 +7,11 @@ EXPOSE 7860
|
|
| 7 |
# Update the system and install Redis
|
| 8 |
RUN apt-get update && apt-get install -y redis-server
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
RUN
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
# Run the Redis server as the main process
|
| 17 |
CMD ["redis-server", "/etc/redis/redis.conf"]
|
|
|
|
| 7 |
# Update the system and install Redis
|
| 8 |
RUN apt-get update && apt-get install -y redis-server
|
| 9 |
|
| 10 |
+
# Get the configuration file from the secret
|
| 11 |
+
RUN --mount=type=secret,id=REDIS_CONFIG,dst=/etc/redis/redis.conf \
|
| 12 |
+
if [ -f /etc/redis/redis.conf ]; then \
|
| 13 |
+
chmod 777 /etc/redis/redis.conf; \
|
| 14 |
+
fi
|
| 15 |
|
| 16 |
+
# Run the Redis server as the main process with the configuration file
|
|
|
|
| 17 |
CMD ["redis-server", "/etc/redis/redis.conf"]
|