All checks were successful
Build Server / Compile DLL (push) Successful in 4m38s
- 添加git安装以增强构建环境功能。
18 lines
525 B
Docker
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"]
|