Tu060925 commited on
Commit
a8a8b33
·
verified ·
1 Parent(s): 3b47011

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +85 -0
Dockerfile ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用 Node.js 官方镜像
2
+ FROM node:22
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 克隆 Yunzai 机器人主项目和插件
8
+ RUN git clone --depth 1 https://github.com/TimeRainStarSky/Yunzai.git ./Yunzai && \
9
+ cd Yunzai && \
10
+ git clone --depth 1 https://github.com/TimeRainStarSky/Yunzai-genshin.git ./plugins/genshin/ && \
11
+ git clone --depth=1 https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/ && \
12
+ git clone --depth=1 https://github.com/zhiyu1998/rconsole-plugin.git ./plugins/rconsole-plugin/ && \
13
+ git clone --depth=1 https://github.com/guoba-yunzai/guoba-plugin.git ./plugins/Guoba-Plugin/ && \
14
+ git clone -b master --depth=1 https://github.com/Yvan-W/yenai-plugin.git ./plugins/yenai-plugin && \
15
+ git clone --depth 1 https://github.com/TimeRainStarSky/TRSS-Plugin.git ./plugins/TRSS-Plugin && \
16
+ git clone --depth=1 https://github.com/Nwflower/auto-plugin.git ./plugins/auto-plugin/ && \
17
+ git clone --depth=1 https://github.com/SmallK111407/earth-k-plugin.git ./plugins/earth-k-plugin/ && \
18
+ git clone --depth=1 https://github.com/AFanSKyQs/FanSky_Qs.git ./plugins/FanSky_Qs/ && \
19
+ cd plugins/FanSky_Qs && \
20
+ pnpm install && \
21
+ cd ../../ && \
22
+ git clone --depth=1 https://github.com/Nwflower/flower-plugin.git ./plugins/flower-plugin/ && \
23
+ git clone --depth=1 https://mirror.ghproxy.com/https://github.com/hanhan258/hanhan-plugin.git ./plugins/hanhan-plugin && \
24
+ cd ./plugins/hanhan-plugin && \
25
+ pnpm i && \
26
+ cd ../../ && \
27
+ git clone --depth 1 https://gitee.com/fox-glaze/hl-ly-plugin ./plugins/hl-ly-plugin && \
28
+ git clone --depth=1 https://github.com/liangshi233/liangshi-calc.git ./plugins/liangshi-calc/ && \
29
+ git clone https://github.com/xianxincoder/xianxin-plugin.git ./plugins/xianxin-plugin/ && \
30
+ git clone --depth 1 https://github.com/xwy231321/ql-plugin.git ./plugins/ql-plugin/ && \
31
+ git clone --depth=1 https://github.com/TsukinaKasumi/StarRail-plugin.git ./plugins/StarRail-plugin && \
32
+ git clone https://github.com/erzaozi/waves-plugin.git ./plugins/waves-plugin && \
33
+ git clone https://github.com/Ctrlcvs/xiaoyao-cvs-plugin.git ./plugins/xiaoyao-cvs-plugin/ && \
34
+ git clone --depth=1 https://github.com/ZZZure/ZZZ-Plugin.git ./plugins/ZZZ-Plugin
35
+
36
+ # 安装插件依赖
37
+ RUN cd Yunzai && \
38
+ pnpm i && \
39
+ pnpm i -P --prefix ./plugins/rconsole-plugin/ && \
40
+ pnpm install --filter=guoba-plugin
41
+
42
+ # 安装 Redis 和 Chromium
43
+ RUN apt-get update && apt-get install -y redis-server && \
44
+ apt install chromium -y
45
+
46
+ # 拷贝 Guoba 配置文件
47
+ COPY ./application.yaml ./plugins/Guoba-Plugin/config/
48
+
49
+ # 执行 ICQQ 安装脚本
50
+ RUN cd Yunzai && \
51
+ curl -sSL 8.134.11.131/icqq.sh | bash
52
+
53
+ # 安装 rclone 并设置权限
54
+ RUN wget https://downloads.rclone.org/v1.68.1/rclone-v1.68.1-linux-amd64.zip && \
55
+ unzip rclone-v1.68.1-linux-amd64.zip && \
56
+ mv rclone-v1.68.1-linux-amd64/rclone /usr/bin/222 && \
57
+ chmod 777 /usr/bin/222
58
+
59
+ # 复制必要文件
60
+ COPY . /RUN
61
+
62
+ # 安装必要依赖&软件
63
+ RUN rm -rf /etc/apt/sources.list.d/debian.sources && mv debian.sources /etc/apt/sources.list.d/ && \
64
+ apt update -y && \
65
+ apt install redis-server ffmpeg atomicparsley chromium inetutils-ping wget unzip cron fonts-noto-cjk ttf-wqy-zenhei fontconfig aria2 -y && \
66
+ mkdir -p /home/node/.local/bin/ && \
67
+ curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /home/node/.local/bin/yt-dlp && \
68
+ chmod a+rx /home/node/.local/bin/yt-dlp && \
69
+ sed -i '$a\export PATH="/home/node:$PATH"' ~/.bashrc && \
70
+ fc-cache -f -v && \
71
+ curl -sSL https://docs.iyear.me/tdl/install.sh | bash && \
72
+ npm install pnpm -g && \
73
+ npm install freyr -g
74
+
75
+ # 设置运行目录
76
+ WORKDIR /RUN
77
+
78
+ # 复制必要文件
79
+ COPY . /RUN
80
+
81
+ # 设置环境变量
82
+ ENV PATH="/home/node/.local/bin:$PATH"
83
+
84
+ # 启动 Yunzai 机器人
85
+ CMD ["node", "app.js"]