All checks were successful
Build Server / Compile DLL (push) Successful in 10m13s
- 更新Dockerfile以添加镜像更新脚本并运行以确保获取最新的镜像。
21 lines
668 B
Docker
21 lines
668 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 .
|
|
# update mirrorlist
|
|
ADD https://raw.githubusercontent.com/greyltc/docker-archlinux/master/get-new-mirrors.sh /usr/bin/get-new-mirrors
|
|
RUN chmod +x /usr/bin/get-new-mirrors && \
|
|
get-new-mirrors
|
|
RUN aur-install bun-bin wechat-bin && \
|
|
bun install --frozen-lockfile
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["bun", "src/index.ts"]
|