Update Dockerfile
Browse files- Dockerfile +11 -2
Dockerfile
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
|
|
| 1 |
FROM openlistteam/openlist:latest
|
| 2 |
USER root
|
|
|
|
|
|
|
| 3 |
RUN apk update && apk add --no-cache \
|
| 4 |
curl \
|
| 5 |
wget \
|
| 6 |
net-tools
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
VOLUME ["/app/data"]
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
| 1 |
+
# 基于你之前能运行的代码修改,适配HF+清理缓存
|
| 2 |
FROM openlistteam/openlist:latest
|
| 3 |
USER root
|
| 4 |
+
|
| 5 |
+
# 用apk --no-cache清理缓存(你的原代码逻辑,保留)
|
| 6 |
RUN apk update && apk add --no-cache \
|
| 7 |
curl \
|
| 8 |
wget \
|
| 9 |
net-tools
|
| 10 |
|
| 11 |
+
# 适配HF:暴露7860端口(替换原5244)
|
| 12 |
+
EXPOSE 7860
|
| 13 |
+
|
| 14 |
+
# 保留原数据目录(不强制持久化,你要“能用就行”,保留原配置)
|
| 15 |
+
ENV OPENLIT_DATA_DIR=/app/data
|
| 16 |
VOLUME ["/app/data"]
|
| 17 |
+
|
| 18 |
+
# 适配HF:启动命令绑定0.0.0.0和7860端口
|
| 19 |
+
CMD ["openlist", "serve", "--host", "0.0.0.0", "--port", "7860"]
|