yuoop commited on
Commit
24320cc
·
verified ·
1 Parent(s): 3c49281

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,24 +1,20 @@
1
- # 使用官方 Python 3.11 slim 镜像作为基础镜像
2
- FROM python:3.11-slim-buster
3
 
4
- # 设置工作目录
5
- WORKDIR /app
6
 
7
- # 将 requirements.txt 文件复制到工作目录
8
  COPY requirements.txt .
9
-
10
- # 安装 requirements.txt 中指定的依赖
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # 将应用程序代码复制到工作目录
14
  COPY . .
15
 
16
- # 设置环境变量 (可选,但推荐)
17
- ENV TARGET_DOMAIN="https://api.chatanywhere.tech"
18
- ENV PORT=8000
19
 
20
  # 暴露端口
21
- EXPOSE 8000
22
 
23
- # 定义启动命令
24
  CMD ["python", "app.py"]
 
1
+ FROM python:3.9-slim
 
2
 
3
+ WORKDIR /code
 
4
 
5
+ # 安装依赖
6
  COPY requirements.txt .
 
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # 复制应用代码
10
  COPY . .
11
 
12
+ # 设置环境变量
13
+ ENV PORT=7860
14
+ ENV TARGET_DOMAIN="http://datukuai.top:1450"
15
 
16
  # 暴露端口
17
+ EXPOSE 7860
18
 
19
+ # 启动命令
20
  CMD ["python", "app.py"]