19 lines
622 B
Docker
19 lines
622 B
Docker
FROM archlinux:base-devel AS lib
|
|
WORKDIR /src
|
|
RUN pacman -Syu --noconfirm 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 builder
|
|
WORKDIR /app
|
|
RUN aur-install bun-bin
|
|
COPY --from=lib /src/wcocr/build/libwcocr.so .
|
|
# COPY src/index.ts .
|
|
|
|
# FROM greyltc/archlinux-aur:yay AS runner
|
|
# WORKDIR /app
|
|
# RUN aur-install wechat-bin
|
|
# COPY --from=builder /app/bun-bin .
|
|
# COPY --from=lib /src/wcocr/build/libwcocr.so .
|