next-playground commited on
Commit
e02dc9e
·
verified ·
1 Parent(s): cc21d37

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.10-slim
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 5000
15
+
16
+ # 运行应用程序
17
+ CMD ["python", "./app.py"]