startmenu commited on
Commit
9b32ce7
·
verified ·
1 Parent(s): 9159f79

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -1,7 +1,8 @@
1
  FROM openlistteam/openlist:latest
2
 
3
- # Hugging Face Spaces 强制要求使用 7860 或 8080 端口
4
  EXPOSE 7860
5
 
6
- # 直接修改启动命令,使用 7860 端口
7
- CMD ["sh", "-c", "cd /opt/openlist && ./openlist server --port 7860 --host 0.0.0.0"]
 
 
 
1
  FROM openlistteam/openlist:latest
2
 
 
3
  EXPOSE 7860
4
 
5
+ WORKDIR /opt/openlist
6
+
7
+ # 在容器启动时创建配置文件并运行
8
+ CMD ["sh", "-c", "mkdir -p data && echo '{\"port\":7860,\"host\":\"0.0.0.0\"}' > data/config.json && ./openlist server --data ./data"]