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" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
反正我直接开ready for review了(
就那样吧(