tianlong12 commited on
Commit
64e0a36
·
verified ·
1 Parent(s): c0257c5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方Python镜像作为基础镜像
2
+ FROM python:3.9
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 复制项目文件到工作目录
8
+ COPY . /app
9
+
10
+ # 安装项目依赖
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # 暴露应用端口
14
+ EXPOSE 8000
15
+
16
+ # 启动应用
17
+ CMD ["python", "app.py"]