Files
wechat-ocr-server/Dockerfile
imbytecat eaa8ae41d5
All checks were successful
Build Server / Compile DLL (push) Successful in 4m38s
chore: 增强构建环境功能,添加git安装
- 添加git安装以增强构建环境功能。
2025-07-08 00:54:52 +08:00

18 lines
525 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 && \
sed -i 's/v3.21.0/v3.21.2/g' wcocr/CMakeLists.txt && \
mkdir -p wcocr/build && cd wcocr/build && cmake .. && make -j$(nproc)
FROM greyltc/archlinux-aur:yay AS runner
WORKDIR /app
RUN aur-install bun-bin wechat-bin
COPY . .
COPY --from=lib /src/wcocr/build/libwcocr.so .
RUN bun install --frozen-lockfile
EXPOSE 3000
CMD ["bun", "src/index.ts"]