Files
wechat-ocr-server/Dockerfile
imbytecat 7fca8d8df6
All checks were successful
Build Server / Compile DLL (push) Successful in 4m1s
Update Dockerfile
2025-07-09 00:08:05 -04:00

19 lines
554 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
RUN aur-install bun-bin wechat-bin && \
pacman -Scc --noconfirm && \
rm -rf /var/cache/makepkg/* /tmp/* /var/log/*
COPY . .
COPY --from=lib /src/wcocr/build/libwcocr.so .
RUN bun install --frozen-lockfile
EXPOSE 3000
CMD ["bun", "src/index.ts"]