CatPtain commited on
Commit
1363af0
·
verified ·
1 Parent(s): cba5ca0

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -2
Dockerfile CHANGED
@@ -49,9 +49,35 @@ USER root
49
  WORKDIR /app/backend
50
  RUN npm install --omit=dev
51
 
52
- # 安装 Playwright 浏览器
53
  RUN npx playwright install chromium
54
- RUN npx playwright install-deps
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  # 复制后端代码
57
  WORKDIR /app
 
49
  WORKDIR /app/backend
50
  RUN npm install --omit=dev
51
 
52
+ # 安装 Playwright 浏览器和依赖
53
  RUN npx playwright install chromium
54
+ # Alpine Linux 手动安装 Playwright 依赖
55
+ RUN apk add --no-cache \
56
+ libgcc \
57
+ libstdc++ \
58
+ libx11 \
59
+ libxcomposite \
60
+ libxdamage \
61
+ libxext \
62
+ libxfixes \
63
+ libxrandr \
64
+ libxss \
65
+ libxtst \
66
+ alsa-lib \
67
+ at-spi2-atk \
68
+ at-spi2-core \
69
+ atk \
70
+ cairo \
71
+ cups-libs \
72
+ dbus-libs \
73
+ expat \
74
+ gdk-pixbuf \
75
+ glib \
76
+ gtk+3.0 \
77
+ libdrm \
78
+ libxkbcommon \
79
+ mesa-gbm \
80
+ pango
81
 
82
  # 复制后端代码
83
  WORKDIR /app