mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
Update Dockerfile
This commit is contained in:
parent
748b8be9ef
commit
ade9797675
18
Dockerfile
18
Dockerfile
@ -37,16 +37,34 @@ EXPOSE 8080
|
||||
|
||||
WORKDIR /app/zhenxun
|
||||
|
||||
# 安装运行时所需的系统依赖
|
||||
RUN apt update && \
|
||||
apt install -y --no-install-recommends \
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
libnss3 \
|
||||
libnspr4 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libcups2 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxfixes3 \
|
||||
libxrandr2 \
|
||||
libgbm1 \
|
||||
libasound2 \
|
||||
libpango-1.0-0 \
|
||||
libcairo2 \
|
||||
&& apt clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 复制依赖项和应用代码
|
||||
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
|
||||
COPY --from=builder /app/zhenxun /app/zhenxun
|
||||
# 复制 Playwright 浏览器
|
||||
COPY --from=builder /root/.cache/ms-playwright /root/.cache/ms-playwright
|
||||
|
||||
# 设置数据和资源目录
|
||||
VOLUME /app/zhenxun/data /app/zhenxun/resources /app/zhenxun/.env.dev
|
||||
|
||||
Loading…
Reference in New Issue
Block a user