Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -2,14 +2,15 @@
|
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# 设置工作目录
|
5 |
-
WORKDIR /
|
6 |
|
7 |
# 将代码复制到容器中
|
|
|
8 |
COPY . /app
|
9 |
|
10 |
# 安装依赖
|
11 |
RUN pip install --no-cache-dir gunicorn
|
12 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
# 准备文件夹
|
15 |
RUN mkdir separated
|
@@ -18,4 +19,4 @@ RUN mkdir separated
|
|
18 |
EXPOSE 5000
|
19 |
|
20 |
# 运行应用程序
|
21 |
-
CMD ["gunicorn", "-b", "0.0.0.0:5000","--timeout", "300", "app:app"]
|
|
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# 设置工作目录
|
5 |
+
WORKDIR /tmp
|
6 |
|
7 |
# 将代码复制到容器中
|
8 |
+
RUN mkdir /app
|
9 |
COPY . /app
|
10 |
|
11 |
# 安装依赖
|
12 |
RUN pip install --no-cache-dir gunicorn
|
13 |
+
RUN pip install --no-cache-dir -r /app/requirements.txt
|
14 |
|
15 |
# 准备文件夹
|
16 |
RUN mkdir separated
|
|
|
19 |
EXPOSE 5000
|
20 |
|
21 |
# 运行应用程序
|
22 |
+
CMD ["gunicorn", "-b", "0.0.0.0:5000","--timeout", "300", "app/app:app"]
|