From 6b1e91964c3a8af7cad2ff7ed14b4bae627e685d Mon Sep 17 00:00:00 2001 From: xiaokai Date: Fri, 30 Aug 2024 17:09:38 +0700 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20pikpak=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=9A=84docker=E6=9C=8D=E5=8A=A1=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++---- entrypoint.sh | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c2803da..863b002d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,9 +38,10 @@ FROM ubuntu as pikpak_server RUN apt update && \ apt install -y git WORKDIR /app -RUN git clone https://github.com/wangjunkai2022/auto_pikpak.git --depth 1 -WORKDIR /app/auto_pikpak -COPY --from=install_py /app/auto_pikpak/venv /app/auto_pikpak/venv +RUN git clone --depth=1 --recurse-submodules https://github.com/wangjunkai2022/pikpak_captcha_server.git +WORKDIR /app/pikpak_captcha_server +RUN rm -rf /app/pikpak_captcha_server/pikpak_captcha/ai/ai_train_pikpak +COPY --from=install_py /app/auto_pikpak/venv /app/pikpak_captcha_server/venv FROM ubuntu ARG INSTALL_FFMPEG=false @@ -53,7 +54,7 @@ RUN apt update && \ apt install -y bash ca-certificates tzdata ffmpeg # 复制 auto_pikpak 到第二阶段 -COPY --from=pikpak_server /app/auto_pikpak /app/auto_pikpak +COPY --from=pikpak_server /app/pikpak_captcha_server /app/pikpak_captcha_server COPY --from=build_alist /app/bin/alist ./ COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh && /entrypoint.sh version diff --git a/entrypoint.sh b/entrypoint.sh index 7b80813e..17b6656b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,11 +4,11 @@ chown -R ${PUID}:${PGID} /opt/alist/ umask ${UMASK} # 指定 Python 程序的工作目录 -PYTHON_DIR="/app/auto_pikpak" +PYTHON_DIR="/app/pikpak_captcha_server" # 启动 Python 程序 ( - cd "$PYTHON_DIR" && /app/auto_pikpak/venv/bin/python3 server.py & + cd "$PYTHON_DIR" && /app/pikpak_captcha_server/venv/bin/python3 server.py & ) if [ "$1" = "version" ]; then