From 4e980220b1420cbe2b7e13827b037e0a5503afb1 Mon Sep 17 00:00:00 2001 From: Dymas Date: Thu, 9 Jul 2026 14:22:04 +0200 Subject: [PATCH] Add Docker branch selector for ani-cli-web Add an build argument to the Docker image so the cloned ani-cli-web source can come from a selected branch, and document the new build option in the README. --- Dockerfile | 4 +++- README.md | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e242f67..1298afb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,14 @@ FROM python:3.12-slim ARG ANI_CLI=https://github.com/pystardust/ani-cli.git ARG ANI_CLI_BRANCH=master ARG ANI_CLI_WEB=https://gitea.coreplay.eu/Dymas/ani-cli-web.git +ARG ANI_CLI_WEB_BRANCH=main ARG YT_DLP_RELEASE_URL=https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp ENV DEBIAN_FRONTEND=noninteractive \ ANI_CLI_REPO=${ANI_CLI} \ ANI_CLI_BRANCH=${ANI_CLI_BRANCH} \ ANI_CLI_WEB_REPO=${ANI_CLI_WEB} \ + ANI_CLI_WEB_BRANCH=${ANI_CLI_WEB_BRANCH} \ ANI_CLI_BIN=ani-cli \ ANI_CLI_DOWNLOAD_DIR=/downloads \ ANI_CLI_WEB_HOST=0.0.0.0 \ @@ -46,7 +48,7 @@ RUN curl -fL "${YT_DLP_RELEASE_URL}" -o /usr/local/bin/yt-dlp \ && chmod 0755 /usr/local/bin/yt-dlp \ && yt-dlp --version -RUN git clone --depth 1 "${ANI_CLI_WEB}" /app \ +RUN git clone --depth 1 --branch "${ANI_CLI_WEB_BRANCH}" "${ANI_CLI_WEB}" /app \ && rm -rf /app/.git \ && rm -f \ /app/.dockerignore \ diff --git a/README.md b/README.md index 945a165..0ed470f 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,14 @@ Build: docker build -t ani-cli-web . ``` +Build a specific `ani-cli-web` branch: + +```sh +docker build \ + --build-arg ANI_CLI_WEB_BRANCH=anipy_backup \ + -t ani-cli-web . +``` + Run: ```sh @@ -84,6 +92,7 @@ Docker notes: - App state is stored under `/app/.ani-cli-web` - `USER_UID` and `USER_GID` help keep mounted files owned by your host user - `UPDATE_ON_START=true` runs `ani-cli --update` before startup +- `ANI_CLI_WEB_BRANCH` lets the image clone a specific `ani-cli-web` branch at build time ## Key behavior