StarrySkyWorld commited on
Commit
aa2ed3e
·
verified ·
1 Parent(s): 3e3d948

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -0
Dockerfile ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # 安装 Playwright 所需的系统依赖
6
+ RUN apt-get update && apt-get install -y \
7
+ libnss3 \
8
+ libnspr4 \
9
+ libatk1.0-0 \
10
+ libatk-bridge2.0-0 \
11
+ libcups2 \
12
+ libdrm2 \
13
+ libxkbcommon0 \
14
+ libxcomposite1 \
15
+ libxdamage1 \
16
+ libxfixes3 \
17
+ libxrandr2 \
18
+ libgbm1 \
19
+ libasound2 \
20
+ libpango-1.0-0 \
21
+ libcairo2 \
22
+ git \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ RUN git clone https://github.com/TheSmallHanCat/flow2api.git .
26
+
27
+
28
+
29
+ # 安装 Python 依赖
30
+ COPY requirements.txt .
31
+ RUN pip install --no-cache-dir -r requirements.txt
32
+
33
+ # 安装 Playwright 浏览器
34
+ RUN playwright install chromium
35
+
36
+ COPY . .
37
+
38
+ EXPOSE 8000
39
+
40
+ CMD ["python", "main.py"]