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.
This commit is contained in:
+3
-1
@@ -3,12 +3,14 @@ FROM python:3.12-slim
|
|||||||
ARG ANI_CLI=https://github.com/pystardust/ani-cli.git
|
ARG ANI_CLI=https://github.com/pystardust/ani-cli.git
|
||||||
ARG ANI_CLI_BRANCH=master
|
ARG ANI_CLI_BRANCH=master
|
||||||
ARG ANI_CLI_WEB=https://gitea.coreplay.eu/Dymas/ani-cli-web.git
|
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
|
ARG YT_DLP_RELEASE_URL=https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
ANI_CLI_REPO=${ANI_CLI} \
|
ANI_CLI_REPO=${ANI_CLI} \
|
||||||
ANI_CLI_BRANCH=${ANI_CLI_BRANCH} \
|
ANI_CLI_BRANCH=${ANI_CLI_BRANCH} \
|
||||||
ANI_CLI_WEB_REPO=${ANI_CLI_WEB} \
|
ANI_CLI_WEB_REPO=${ANI_CLI_WEB} \
|
||||||
|
ANI_CLI_WEB_BRANCH=${ANI_CLI_WEB_BRANCH} \
|
||||||
ANI_CLI_BIN=ani-cli \
|
ANI_CLI_BIN=ani-cli \
|
||||||
ANI_CLI_DOWNLOAD_DIR=/downloads \
|
ANI_CLI_DOWNLOAD_DIR=/downloads \
|
||||||
ANI_CLI_WEB_HOST=0.0.0.0 \
|
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 \
|
&& chmod 0755 /usr/local/bin/yt-dlp \
|
||||||
&& yt-dlp --version
|
&& 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 -rf /app/.git \
|
||||||
&& rm -f \
|
&& rm -f \
|
||||||
/app/.dockerignore \
|
/app/.dockerignore \
|
||||||
|
|||||||
@@ -59,6 +59,14 @@ Build:
|
|||||||
docker build -t ani-cli-web .
|
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:
|
Run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -84,6 +92,7 @@ Docker notes:
|
|||||||
- App state is stored under `/app/.ani-cli-web`
|
- App state is stored under `/app/.ani-cli-web`
|
||||||
- `USER_UID` and `USER_GID` help keep mounted files owned by your host user
|
- `USER_UID` and `USER_GID` help keep mounted files owned by your host user
|
||||||
- `UPDATE_ON_START=true` runs `ani-cli --update` before startup
|
- `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
|
## Key behavior
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user