Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +20 -1
Dockerfile
CHANGED
@@ -1 +1,20 @@
|
|
1 |
-
FROM fossandroid/openwebui:latest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM fossandroid/openwebui:latest
|
2 |
+
|
3 |
+
# 安装Redis
|
4 |
+
RUN apt-get update && apt-get install -y redis-server
|
5 |
+
|
6 |
+
# 修改Redis配置和权限
|
7 |
+
RUN mkdir -p /var/run/redis && \
|
8 |
+
chown -R 1000:1000 /var/run/redis && \
|
9 |
+
chown -R 1000:1000 /var/lib/redis && \
|
10 |
+
chmod 777 /var/run/redis
|
11 |
+
|
12 |
+
# 创建启动Redis的脚本
|
13 |
+
RUN echo "#!/bin/bash" > redis-start.sh && \
|
14 |
+
echo "redis-server --daemonize yes --save '' --appendonly no" >> redis-start.sh && \
|
15 |
+
echo "sleep 2" >> redis-start.sh && \
|
16 |
+
echo "echo 'Redis status:'" >> redis-start.sh && \
|
17 |
+
echo "redis-cli ping" >> redis-start.sh
|
18 |
+
|
19 |
+
RUN chmod -R 777 ./data && \
|
20 |
+
sed -i "1r redis-start.sh" ./start.sh
|