# 使用基于 Node.js 18 的镜像 FROM node:22 #ARG kook #ARG qqbot ARG rs # 安装 Redis RUN apt-get update && apt-get install -y redis-server # 安装 Chromium RUN apt install chromium -y # 将工作目录设置为 app 目录 WORKDIR /app # 将项目文件复制到容器中 COPY ./Yunzai /app COPY ./application.yaml /app # 安装插件 RUN git clone --depth 1 https://github.com/TimeRainStarSky/Yunzai-genshin plugins/genshin RUN git clone --depth 1 https://github.com/yoimiya-kokomi/miao-plugin plugins/miao-plugin RUN git clone --depth 1 https://github.com/Ctrlcvs/xiaoyao-cvs-plugin.git plugins/xiaoyao-cvs-plugin RUN git clone --depth 1 https://github.com/erzaozi/waves-plugin.git plugins/waves-plugin RUN git clone --depth 1 https://github.com/Nwflower/atlas plugins/Atlas RUN git clone --depth 1 https://github.com/Nwflower/genshin-atlas.git plugins/Atla/Genshin-Atlas RUN git clone --depth 1 https://github.com/Nwflower/star-rail-atlas.git plugins/Atla/star-rail-atla RUN git clone --depth 1 https://gitee.com/hewang1an/StarRail-plugin.git plugins/StarRail-plugin RUN git clone --depth=1 https://gitee.com/lylnspace/yenai-plugin.git ./plugins/yenai-plugin RUN git clone --depth=1 https://github.com/ZZZure/ZZZ-Plugin.git plugins/ZZZ-Plugin RUN git clone --depth=1 https://gitee.com/guoba-yunzai/guoba-plugin.git ./plugins/Guoba-Plugin/ # 安装适配器 RUN git clone --depth=1 https://gitee.com/TimeRainStarSky/Yunzai-KOOK-Plugin plugin/KOOK-Plugin RUN git clone --depth=1 https://gitee.com/TimeRainStarSky/Yunzai-ICQQ-Plugin plugins/ICQQ-Plugin RUN git clone --depth=1 https://gitee.com/TimeRainStarSky/Yunzai-QQBot-Plugin plugins/QQBot-Plugin #RUN echo "${kook}" >>config/config/QQBot.yaml #RUN echo "${qqbot}" >>config/config/QQBot.yaml RUN echo "${rs}" >>config/config/redis.yaml # 拷贝 Guoba 配置文件 COPY ./application.yaml ./plugins/Guoba-Plugin/config/ # 给予权限 RUN chmod -R 777 /app # 安装依赖 RUN npm install -g pnpm RUN pnpm install --filter=guoba-plugin RUN pnpm install # 启动应用程序 CMD ["node", "app.js"]