hayou2002 commited on
Commit
c6055ed
·
verified ·
1 Parent(s): 6578c0e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -13
Dockerfile CHANGED
@@ -1,22 +1,15 @@
1
- # 基于你原可运行代码,安装Python解决命令缺失
2
  FROM openlistteam/openlist:latest
3
- USER root
4
 
5
- # 1. 安装Python3(解决python命令找不到)+ 工具+清理缓存
 
6
  RUN apk update && apk add --no-cache \
7
  curl \
8
  wget \
9
- net-tools \
10
- python3 && \
11
- # 链接python3到python,确保命令可用
12
- ln -s /usr/bin/python3 /usr/bin/python
13
-
14
- # 2. 适配HF端口
15
- EXPOSE 7860
16
 
17
- # 3. 保留原数据目录配置
18
  ENV OPENLIST_DATA_DIR=/app/data
19
  VOLUME ["/app/data"]
20
 
21
- # 4. 启动命令(现在容器内有python了)
22
- CMD ["python", "-m", "openlist.main", "serve", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
1
  FROM openlistteam/openlist:latest
 
2
 
3
+ WORKDIR /app
4
+
5
  RUN apk update && apk add --no-cache \
6
  curl \
7
  wget \
8
+ net-tools
 
 
 
 
 
 
9
 
 
10
  ENV OPENLIST_DATA_DIR=/app/data
11
  VOLUME ["/app/data"]
12
 
13
+ EXPOSE 5244
14
+
15
+ CMD ["openlist", "serve", "--host", "0.0.0.0", "--port", "5244"]