XYBotV2-core/Dockerfile
李寻欢 f556305be2
All checks were successful
BuildImage / build-image (push) Successful in 1m16s
补充遗漏提交
2025-02-20 23:18:00 +08:00

36 lines
768 B
Docker

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
LABEL org.opencontainers.image.authors="lxh@cxh.cn"
# 预定义参数
ENV TZ="Asia/Shanghai"
ENV PORT=9000
ENV MODE=release
ENV REDIS_HOST="127.0.0.1"
ENV REDIS_PORT=6379
ENV REDIS_PASSWORD=""
ENV REDIS_DB=0
# 设置工作目录
WORKDIR /app
# 复制文件
COPY . .
COPY --from=core /usr/local/lib/python3.11/site-packages/xywechatpad_binary/binaries/linux_x64 ./WechatAPI/core/
#RUN ls -lah ./WechatAPI/core
# 开始运行
CMD /app/WechatAPI/core/XYWechatPad \
-p $PORT \
-m $MODE \
-rh $REDIS_HOST \
-rp $REDIS_PORT \
-rpwd $REDIS_PASSWORD \
-rdb $REDIS_DB