Last active
July 22, 2024 17:10
-
-
Save zihu12/5b8894deb696d119a0dc5ed1920b8596 to your computer and use it in GitHub Desktop.
Dockerfile for huangz1342/icalingua-bridge-oicq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" ] |
按我理解要缩小成类似我这样可能改动还不小(
至少可能有L8-L11那样的操作?
明天再看下他们那个文件(
我之前加这个的时候还认为我这镜像只能用sqlite数据库
等我先去买个煎饼吃(
然后再测试一下(
按我的理解弄了下(
huangz1342/icalingua-bridge-oicq:alpine-2.11.1-test
你那有空看下能不能用( 至少运行node build
是没问题的( 顺带你能解释下为什么他们要把curl
留在镜像里吗......
我也不知道啊.png
反正这块的东西感觉都很老了(
等我先去买个煎饼吃( 然后再测试一下(
有什么进展吗(
我看好像没有pull(
我想想哈(
再稍微等会(
我想想哈( 再稍微等会(
或者要不直接提pr算了(
到时pr里说没测试什么的(
也行(
我现在pull一下
(
也行( 我现在pull一下 (
Icalingua-plus-plus/Icalingua-plus-plus#774
要是你那没问题我就开ready for review(
也行( 我现在pull一下 (
你那有什么进展不(
我小号疯狂被风控(
草,主要是官方的数据和目录格式不太一样,我懒得动
不过我的号一直能登(
lazy(
以及还有个问题……
ica archive了……
草,主要是官方的数据和目录格式不太一样,我懒得动 不过我的号一直能登( lazy(
主要发文件是正常的吧(
数据库什么的问题应该不大(
其他消息功能我在小号被风控之前测了
以及还有个问题…… ica archive了……
有吗?
好,又不archive了(
昨天还在的(
好,又不archive了( 昨天还在的(
反正我直接开ready for review了(
就那样吧(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
确实是改了(
但是之前一直用着你的 image,官方的格式还不咋一样,你的镜像文件也更小,就用你的了(
你要不然去发个pr,给官方image缩减一下体积(