XYBotV2-core/Dockerfile

30 lines
647 B
Docker
Raw Normal View History

2025-02-20 23:10:18 +08:00
FROM python:3.11-slim AS core
RUN pip install --no-cache-dir xywechatpad-binary
RUN pip show xywechatpad-binary
FROM debian:bookworm-slim AS runner
2025-02-17 09:18:57 +08:00
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
# 预定义参数
ENV TZ="Asia/Shanghai"
2025-02-17 15:08:21 +08:00
2025-02-17 09:18:57 +08:00
# 设置工作目录
WORKDIR /app
# 复制文件
COPY . .
COPY --from=core /usr/local/lib/python3.11/site-packages/xywechatpad_binary/binaries/linux_x64 ./WechatAPI/core/
2025-02-20 23:10:18 +08:00
#RUN ls -lah ./WechatAPI/core
2025-02-17 15:08:21 +08:00
2025-02-17 09:18:57 +08:00
# 开始运行
2025-02-20 23:04:38 +08:00
CMD /app/WechatAPI/core/XYWechatPad \
-p $PORT \
-m $MODE \
-rh $REDIS_HOST \
-rp $REDIS_PORT \
-rpwd $REDIS_PASSWORD \
-rdb $REDIS_DB