增加打包带noVNC的镜像
BuildImage / build-image (push) Has been cancelled Details

This commit is contained in:
李寻欢 2024-02-23 17:12:59 +08:00
parent c4b32a8d41
commit ce9119ff59
4 changed files with 66 additions and 3 deletions

View File

@ -28,12 +28,29 @@ jobs:
WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe
WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll
- name: Build 3.9.8.25 version with noVNC
uses: docker/build-push-action@v2
with:
push: true
tags: lxh01/wxhelper-docker:3.9.8.25-v2
file: Dockerfile.novnc
build-args: |
WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.8.25/WeChatSetup-3.9.8.25.exe
WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.8.25-v2/wxhelper.dll
- name: Build 3.9.5.81 version
uses: docker/build-push-action@v2
with:
push: true
tags: lxh01/wxhelper-docker:3.9.5.81-v11
- name: Build 3.9.5.81 version with noVNC
uses: docker/build-push-action@v2
with:
push: true
tags: lxh01/wxhelper-docker:3.9.5.81-v11
file: Dockerfile.novnc
- name: Build 3.9.8.25 version
uses: docker/build-push-action@v2
with:
@ -42,3 +59,13 @@ jobs:
build-args: |
WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe
WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll
- name: Build 3.9.8.25 version with noVNC
uses: docker/build-push-action@v2
with:
push: true
tags: lxh01/wxhelper-docker:3.9.2.23-v9
file: Dockerfile.novnc
build-args: |
WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.2.23/WeChatSetup-3.9.2.23.exe
WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.2.23-v9/wxhelper.dll

View File

@ -23,8 +23,6 @@ RUN sudo chown app:app WeChatSetup.exe && sudo chmod a+x WeChatSetup.exe
ADD ${WXHELPER_URL} wxhelper.dll
RUN sudo chown app:app wxhelper.dll
RUN ls -lah
# 安装微信
COPY install-wechat.sh install-wechat.sh
RUN sudo chmod a+x install-wechat.sh && ./install-wechat.sh

37
Dockerfile-novnc Normal file
View File

@ -0,0 +1,37 @@
FROM furacas/wine-vnc-box:latest
ENV WINEDEBUG=fixme-all
# 根据传入参数安装微信和wxhelper.dll
ARG WECHAT_URL=https://github.com/tom-snow/wechat-windows-versions/releases/download/v3.9.5.81/WeChatSetup-3.9.5.81.exe
ARG WXHELPER_URL=https://github.com/ttttupup/wxhelper/releases/download/3.9.5.81-v11/wxhelper.dll
WORKDIR /home/app/.wine/drive_c
# 加载注入器
ADD https://github.com/furacas/DllInjector/releases/download/v1.4.0/DllInjector64.exe DllInjector.exe
RUN sudo chown app:app DllInjector.exe && sudo chmod a+x DllInjector.exe
# 下载微信
ADD ${WECHAT_URL} WeChatSetup.exe
RUN sudo chown app:app WeChatSetup.exe && sudo chmod a+x WeChatSetup.exe
# 下载wxhelper.dll
ADD ${WXHELPER_URL} wxhelper.dll
RUN sudo chown app:app wxhelper.dll
RUN ls -lah
# 安装微信
COPY install-wechat.sh install-wechat.sh
RUN sudo chmod a+x install-wechat.sh && ./install-wechat.sh
RUN rm -rf WeChatSetup.exe && rm -rf install-wechat.sh
# 处理中文字体
RUN sudo apt install -y winetricks && winetricks cjkfonts
EXPOSE 8080 19088
COPY cmd.sh /cmd.sh
RUN sudo chmod +x /cmd.sh
CMD ["/cmd.sh"]

3
cmd.sh
View File

@ -28,9 +28,10 @@ if [ $NOTIFY_URL ];then
echo "HOOK 疑似注入失败19088 端口未监听,请手动检查是否注入成功"
status = "fail"
fi
curl -X POST $NOTIFY_URL -H 'Content-Type: application/json' -d '{"status": "'"$status"'", "robot": "'"$REMARK"'"}'
curl -X POST $NOTIFY_URL -H 'Content-Type: application/json' -d '{"status": "'"$status"'", "robot": "'"$REMARK"'", "apiHost": "'"$API"'"}'
else
echo "未配置回调通知地址,跳过通知消息发送"
echo "如果需要请配置NOTIFY_URL、REMARK、API三个环境变量它们分别是通知地址、机器人备注、外部请求机器人的API地址"
fi
wait