Fix Docker animdl packaging

This commit is contained in:
Dymas
2026-07-19 15:10:41 +02:00
parent 363de302a8
commit 3f4baf21e8
5 changed files with 30 additions and 39 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.49.3 - 2026-07-19
- Changed Docker builds to copy the current local `ani-cli-web` checkout into the image instead of cloning the configured remote branch, so rebuilt images include local Docker/runtime fixes immediately.
- Installed Docker `anipy-cli` and `animdl` in separate virtualenvs, with `animdl` pinned under Python 3.11 so its older native dependency pins resolve and remain executable.
- Removed the unused `ANI_CLI_WEB` compose build argument and updated Docker documentation to match the local-checkout build flow.
## 0.49.2 - 2026-07-19
- Fixed the Config page dependency check so Docker-installed fallback tools are detected from `/usr/local/bin` and `/usr/bin`, matching the runtime command lookup.
+20 -27
View File
@@ -1,16 +1,12 @@
FROM python:3.12-slim
FROM python:3.12-slim-bookworm
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} \
PATH=/usr/local/bin:/usr/bin:/bin \
ANI_CLI_BIN=ani-cli \
ANIPY_CLI_BIN=/usr/local/bin/anipy-cli \
@@ -30,10 +26,15 @@ RUN apt-get update \
curl \
ffmpeg \
fzf \
build-essential \
git \
grep \
libxml2-dev \
libxslt1-dev \
openssl \
patch \
python3.11 \
python3.11-venv \
sed \
sudo \
util-linux \
@@ -52,33 +53,25 @@ RUN curl -fL "${YT_DLP_RELEASE_URL}" -o /usr/local/bin/yt-dlp \
&& chmod 0755 /usr/local/bin/yt-dlp \
&& yt-dlp --version
RUN python3 -m pip install \
--no-cache-dir \
--no-warn-script-location \
--root-user-action=ignore \
--prefix=/usr/local \
anipy-cli \
animdl \
&& test -x /usr/local/bin/anipy-cli \
&& python3 -c "from animdl.__main__ import __animdl_cli__" \
&& printf '%s\n' '#!/bin/sh' 'exec python3 -c "from animdl.__main__ import __animdl_cli__; __animdl_cli__()" "$@"' > /usr/local/bin/animdl \
&& chmod 0755 /usr/local/bin/animdl \
RUN python3 -m venv /opt/anipy-cli \
&& /opt/anipy-cli/bin/pip install --no-cache-dir --upgrade pip \
&& /opt/anipy-cli/bin/pip install --no-cache-dir anipy-cli \
&& python3.11 -m venv /opt/animdl \
&& /opt/animdl/bin/pip install --no-cache-dir --upgrade pip \
&& /opt/animdl/bin/pip install --no-cache-dir animdl==1.7.27 \
&& test -x /opt/anipy-cli/bin/anipy-cli \
&& test -x /opt/animdl/bin/animdl \
&& printf '%s\n' '#!/bin/sh' 'exec /opt/anipy-cli/bin/anipy-cli "$@"' > /usr/local/bin/anipy-cli \
&& printf '%s\n' '#!/bin/sh' 'exec /opt/animdl/bin/animdl "$@"' > /usr/local/bin/animdl \
&& chmod 0755 /usr/local/bin/anipy-cli /usr/local/bin/animdl \
&& ln -sf /usr/local/bin/anipy-cli /usr/bin/anipy-cli \
&& ln -sf /usr/local/bin/animdl /usr/bin/animdl \
&& /usr/local/bin/anipy-cli --version \
&& /usr/local/bin/animdl --version
RUN git clone --depth 1 --branch "${ANI_CLI_WEB_BRANCH}" "${ANI_CLI_WEB}" /app \
&& rm -rf /app/.git \
&& rm -f \
/app/.dockerignore \
/app/.gitignore \
/app/Dockerfile \
/app/README.md \
/app/ani-cli-web \
/app/docker-compose.yaml \
/app/docker-entrypoint.sh \
/app/test_app.py
RUN mkdir -p /app
COPY app.py app_support.py config_page.py http_handler.py queue_jobs.py queue_page.py search_page.py template_helpers.py title_matching.py watchlist_identity.py watchlist_page.py web_templates.py VERSION CHANGELOG.md favicon.png /app/
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
+3 -10
View File
@@ -2,7 +2,7 @@
Local web UI for a system-wide `ani-cli` install.
Current version: `0.49.2`
Current version: `0.49.3`
## What it does
@@ -61,13 +61,7 @@ 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 .
```
Docker builds the app from the current local checkout.
Run:
@@ -94,9 +88,8 @@ 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
- `botan` is installed inside the container for providers or scripts that need Botan cryptography tooling
- `anipy-cli` and `animdl` are installed systemwide inside the container at `/usr/local/bin`, linked from `/usr/bin`, and included in the runtime `PATH`, so fallback retries are available without extra container setup
- `anipy-cli` and `animdl` are installed systemwide inside the container at `/usr/local/bin`, linked from `/usr/bin`, and included in the runtime `PATH`; `animdl` is isolated in a Python 3.11 virtualenv so its pinned dependencies stay executable
## Key behavior
+1 -1
View File
@@ -1 +1 @@
0.49.2
0.49.3
-1
View File
@@ -6,7 +6,6 @@ services:
args:
ANI_CLI: ${ANI_CLI:-https://github.com/pystardust/ani-cli.git}
ANI_CLI_BRANCH: ${ANI_CLI_BRANCH:-master}
ANI_CLI_WEB: ${ANI_CLI_WEB:-https://gitea.coreplay.eu/Dymas/ani-cli-web.git}
image: ani-cli-web:latest
container_name: ani-cli-web
restart: unless-stopped