Files
wechat-ocr-server/Dockerfile
imbytecat 64347726f0
Some checks failed
Build Server / Compile DLL (push) Has been cancelled
fix: 修复清理缓存路径中的环境变量问题
- 修复清理缓存路径中的环境变量问题以确保脚本有效运行。
2025-07-19 15:25:57 +08:00

19 lines
597 B
Docker

FROM archlinux:base-devel AS lib
WORKDIR /src
RUN pacman -Syu --noconfirm git cmake python nodejs && \
git clone https://github.com/swigger/wechat-ocr.git wcocr && \
mkdir -p wcocr/build && cd wcocr/build && cmake .. && make -j$(nproc)
FROM greyltc/archlinux-aur:yay AS runner
WORKDIR /app
COPY . .
COPY --from=lib /src/wcocr/build/libwcocr.so .
RUN aur-install bun-bin wechat-bin && \
pacman -Scc --noconfirm && rm -rf /var/cache/pacman/pkg/* && \
yay -Scc --noconfirm && rm -rf /root/.cache/yay/* && \
bun install --frozen-lockfile
EXPOSE 3000
CMD ["bun", "src/index.ts"]