youbiaokachi commited on
Commit
613730a
·
verified ·
1 Parent(s): bfdde3a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -16
Dockerfile CHANGED
@@ -1,16 +1,22 @@
1
- FROM mcr.microsoft.com/playwright/python:v1.44.0-jammy
2
-
3
- WORKDIR /app
4
-
5
- RUN pip install --no-cache-dir flask requests curl_cffi werkzeug loguru python-dotenv patchright
6
-
7
- RUN python -m patchright install --with-deps chrome
8
-
9
- COPY . .
10
-
11
- ENV PORT=5200
12
- ENV PYTHONUNBUFFERED=1
13
-
14
- EXPOSE 5200
15
-
16
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
1
+ FROM mcr.microsoft.com/playwright/python:v1.44.0-jammy
2
+
3
+ WORKDIR /app
4
+
5
+ RUN pip install --no-cache-dir flask requests curl_cffi werkzeug loguru python-dotenv patchright
6
+
7
+ RUN python -m patchright install --with-deps chrome
8
+
9
+ # 创建 /data 目录并设置权限
10
+ RUN mkdir -p /data && chmod 755 /data
11
+
12
+ COPY . .
13
+
14
+ # 确保以适当的用户运行
15
+ USER root
16
+
17
+ ENV PORT=5200
18
+ ENV PYTHONUNBUFFERED=1
19
+
20
+ EXPOSE 5200
21
+
22
+ CMD ["python", "app.py"]