Skip to content

Instantly share code, notes, and snippets.

@zihu12
Last active July 22, 2024 17:10
Show Gist options
  • Save zihu12/5b8894deb696d119a0dc5ed1920b8596 to your computer and use it in GitHub Desktop.
Save zihu12/5b8894deb696d119a0dc5ed1920b8596 to your computer and use it in GitHub Desktop.
Dockerfile for huangz1342/icalingua-bridge-oicq
# build.sh
# Copyright (c) zihu12
# License: AGPL-3.0
#!/bin/bash
#export VERSION=2.12.2
#Just remove the 'v' from upstream tag name to keep image names persistent
export VERSION=$(curl https://api.github.com/repos/Icalingua-plus-plus/Icalingua-plus-plus/releases/latest |jq -r .tag_name |cut -c 2-)
docker build --build-arg VERSION=$VERSION -t huangz1342/icalingua-bridge-oicq:latest -t huangz1342/icalingua-bridge-oicq:$VERSION - < ./Dockerfile
docker push -a docker.io/huangz1342/icalingua-bridge-oicq
# Dockerfile for icalingua-bridge-oicq
# Based on code from https://github.com/Icalingua-plus-plus/Icalingua-plus-plus (licensed under AGPL-3.0)
# Copyright (c) zihu12
# License: AGPL-3.0
FROM docker.io/library/node:18 AS build
ARG VERSION
RUN git clone https://github.com/Icalingua-plus-plus/Icalingua-plus-plus.git --depth=1 -b v$VERSION
WORKDIR /Icalingua-plus-plus/icalingua-bridge-oicq
RUN corepack enable && npm install -g node-prune
RUN pnpm install
RUN pnpm compile
RUN mv /Icalingua-plus-plus/icalingua-bridge-oicq/build/ /opt/build/ && cp -f /Icalingua-plus-plus/.npmrc /opt/build/.npmrc
WORKDIR /opt/build/
ENV NODE_ENV=production
RUN pnpm install && pnpm install uuid body-parser lodash
RUN node-prune
RUN pnpm install sqlite3 && rm -f .npmrc
WORKDIR /Icalingua-plus-plus/
RUN wget -q https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz && tar xf ffmpeg-release-amd64-static.tar.xz \
&& mv ffmpeg*/ffmpeg /Icalingua-plus-plus/ffmpeg
FROM docker.io/library/node:18-slim
COPY --from=build --chown=node:node /opt/build/ opt/build
COPY --from=build /Icalingua-plus-plus/ffmpeg /usr/local/bin
VOLUME [ "/opt/build/data" ]
WORKDIR /opt/build
EXPOSE 6789/tcp
CMD [ "node","index" ]
@zihu12
Copy link
Author

zihu12 commented Jan 26, 2024

也行( 我现在pull一下 (

Icalingua-plus-plus/Icalingua-plus-plus#774
要是你那没问题我就开ready for review(

@zihu12
Copy link
Author

zihu12 commented Jan 26, 2024

也行( 我现在pull一下 (

image

你那出现过这种问题不.....
(用bridge上传文件的时候

@zihu12
Copy link
Author

zihu12 commented Jan 26, 2024

也行( 我现在pull一下 (

image 你那出现过这种问题不..... (用bridge上传文件的时候

你那先试下能不能发文件......
语音那个估计是ffmpeg的问题......
你那可以的话我就当是我这的网络问题了.......

@zihu12
Copy link
Author

zihu12 commented Jan 29, 2024

也行( 我现在pull一下 (

你那有什么进展不(
我小号疯狂被风控(

@shenjackyuanjie
Copy link

草,主要是官方的数据和目录格式不太一样,我懒得动
不过我的号一直能登(
lazy(

@shenjackyuanjie
Copy link

以及还有个问题……
ica archive了……

@zihu12
Copy link
Author

zihu12 commented Jan 29, 2024

草,主要是官方的数据和目录格式不太一样,我懒得动 不过我的号一直能登( lazy(

主要发文件是正常的吧(
数据库什么的问题应该不大(
其他消息功能我在小号被风控之前测了

@zihu12
Copy link
Author

zihu12 commented Jan 29, 2024

以及还有个问题…… ica archive了……

有吗?

@shenjackyuanjie
Copy link

好,又不archive了(
昨天还在的(

@zihu12
Copy link
Author

zihu12 commented Jan 30, 2024

好,又不archive了( 昨天还在的(

反正我直接开ready for review了(
就那样吧(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment