From c757a58f69a6cbe265a2de47de0f4eedd333a12f Mon Sep 17 00:00:00 2001 From: Dymas Date: Tue, 26 May 2026 20:01:52 +0200 Subject: [PATCH] Trim repo-only files from Docker image --- CHANGELOG.md | 5 +++++ Dockerfile | 12 +++++++++++- README.md | 3 ++- VERSION | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 730b1f7..59bcbc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.45.13 - 2026-05-26 + +- Trimmed the Docker runtime image by removing repo-only files from `/app` after cloning, so the container no longer carries development docs, Compose/build files, or the test suite it does not use at runtime. +- Kept the checked-in `VERSION` file inside the image so Runtime info and startup logging still have the release metadata they now read at runtime. + ## 0.45.12 - 2026-05-26 - Changed `ani-cli-web` runtime version reporting to load directly from the project `VERSION` file instead of a duplicated hardcoded constant, which keeps Runtime info, API version responses, and startup logs in sync with release metadata. diff --git a/Dockerfile b/Dockerfile index f4c4321..2aa9571 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,7 +47,17 @@ RUN curl -fL "${YT_DLP_RELEASE_URL}" -o /usr/local/bin/yt-dlp \ && yt-dlp --version RUN git clone --depth 1 "${ANI_CLI_WEB}" /app \ - && rm -rf /app/.git + && rm -rf /app/.git \ + && rm -f \ + /app/.dockerignore \ + /app/.gitignore \ + /app/CHANGELOG.md \ + /app/Dockerfile \ + /app/README.md \ + /app/ani-cli-web \ + /app/docker-compose.yaml \ + /app/docker-entrypoint.sh \ + /app/test_app.py COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh diff --git a/README.md b/README.md index 8220c5f..5a3ffea 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Small local web UI for a system-wide `ani-cli` install. -Current version: `0.45.12` +Current version: `0.45.13` ## Project Layout @@ -109,6 +109,7 @@ Container notes: - `ani-cli` is installed at `/usr/local/bin/ani-cli`. - `yt-dlp` is installed at `/usr/local/bin/yt-dlp` from the latest GitHub release during build. - `ani-cli-web` runs from `/app`. +- The runtime image removes repo-only files such as `README.md`, `Dockerfile`, `docker-compose.yaml`, and `test_app.py` after cloning, while keeping the app's `VERSION` file for Runtime info. - Downloads go to `/downloads`. - App state lives in `/app/.ani-cli-web`. - The container binds `0.0.0.0:8421`. diff --git a/VERSION b/VERSION index cbb488e..c45f326 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.45.12 +0.45.13