From 74a530f1fd4a3230708e558d668df813b8b25e38 Mon Sep 17 00:00:00 2001 From: up <1457368987@qq.com> Date: Fri, 7 Aug 2026 14:26:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs(docker):=20=E4=BF=AE=E6=AD=A3=20full?= =?UTF-8?q?=20=E9=95=9C=E5=83=8F=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 背景 / Background:README 把不存在的 GHCR `:full` 写成预装浏览器镜像;真实发布标签为 `:latest-full` 和版本化 `-full`。 / README advertised the nonexistent GHCR `:full` tag; published tags use `:latest-full` or versioned `-full`. - 改动 / Changes:更新 README 与安装文档,明确区分 published image tag 和本地 Docker `full` build target;增加文档回归测试。 / Document the published tags separately from the local Docker `full` target and add regression coverage. - 文件 / Files:README.md,docs/installation.md,tests/unit/documentation/docker-image-tags.test.ts - 验证 / Verification:定向测试 2 passed;`npm run lint`、`npm run build` 通过;完整 `npm run test` 为 28 failed / 8,344 passed,失败均在未改动的 REPL/browser/health/init/perf/live research 测试。 / Focused tests passed; lint and build passed; full suite reported 28 unrelated failures and 8,344 passes. --- README.md | 2 +- docs/installation.md | 8 +++++++- .../documentation/docker-image-tags.test.ts | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/unit/documentation/docker-image-tags.test.ts diff --git a/README.md b/README.md index 010696944..16e8c897b 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ docker run -p 3333:3333 -v wigolo-data:/data \ ghcr.io/knockoutez/wigolo serve --host 0.0.0.0 ``` -The slim image lazy-loads models into the volume; `:full` preinstalls the browser engine. Also on Docker Hub as `towhid69420/wigolo`. → [installation & all channels](docs/installation.md) +The slim image lazy-loads models into the volume; `ghcr.io/knockoutez/wigolo:latest-full` preinstalls the browser engine. Versioned releases use the same `-full` suffix (for example, `0.2.1-full`). Also on Docker Hub as `towhid69420/wigolo`. → [installation & all channels](docs/installation.md) ### Agent skills diff --git a/docs/installation.md b/docs/installation.md index 05e325420..99eed13cc 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -43,7 +43,13 @@ docker compose -f packaging/compose.serve.yml up The compose file binds `0.0.0.0` inside the container, which is a non-loopback bind: the daemon **fails closed** and refuses to start until you set `WIGOLO_API_TOKEN` (uncomment the line in the file) or explicitly opt into open access. Details in [self-hosting](./self-hosting.md). -The repo's `Dockerfile` also has a `full` build target with the browser engine preinstalled at build time — useful for `--rm`/no-volume runs where first-use downloads would repeat: +The published browser-preloaded image is `ghcr.io/knockoutez/wigolo:latest-full`; versioned releases use the same `-full` suffix (for example, `0.2.1-full`). It is useful for `--rm`/no-volume runs where first-use browser downloads would repeat: + +```bash +docker run -i --rm ghcr.io/knockoutez/wigolo:latest-full +``` + +For local builds, the repo's `Dockerfile` exposes the corresponding `full` build target: ```bash docker build --target full -t wigolo:full . diff --git a/tests/unit/documentation/docker-image-tags.test.ts b/tests/unit/documentation/docker-image-tags.test.ts new file mode 100644 index 000000000..8b9eb17ae --- /dev/null +++ b/tests/unit/documentation/docker-image-tags.test.ts @@ -0,0 +1,18 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { describe, expect, it } from 'vitest'; + +const repoRoot = join(import.meta.dirname, '..', '..', '..'); +const readme = readFileSync(join(repoRoot, 'README.md'), 'utf-8'); +const installationGuide = readFileSync(join(repoRoot, 'docs', 'installation.md'), 'utf-8'); + +describe('published Docker image tags', () => { + it('documents the published browser-preloaded image tag', () => { + expect(readme).toContain('ghcr.io/knockoutez/wigolo:latest-full'); + expect(installationGuide).toContain('ghcr.io/knockoutez/wigolo:latest-full'); + }); + + it('does not present the nonexistent :full tag as a published image', () => { + expect(readme).not.toContain('`:full` preinstalls the browser engine'); + }); +}); From a4720de70d66d77dc39afe85085ffb12128f85e6 Mon Sep 17 00:00:00 2001 From: up <1457368987@qq.com> Date: Fri, 7 Aug 2026 14:35:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?test(docker):=20=E5=8A=A0=E5=9B=BA=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=A0=87=E7=AD=BE=E5=9B=9E=E5=BD=92=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 背景 / Background:PR review 指出测试依赖 Node 20.11+ 的 import.meta.dirname,且负向断言只绑定特定 README 句子。 / Review found a Node 20 compatibility gap and an overly narrow negative assertion. - 改动 / Changes:改用 fileURLToPath(import.meta.url) 定位仓库根目录,并在 README 与安装文档中直接排除远端 ghcr.io/knockoutez/wigolo:full。 / Resolve paths from import.meta.url and reject the nonexistent registry identifier in both documents. - 文件 / Files:tests/unit/documentation/docker-image-tags.test.ts - 验证 / Verification:定向测试 2 passed;npm run lint 与 git diff --check 通过。 / Focused tests, lint, and diff check passed. --- tests/unit/documentation/docker-image-tags.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/unit/documentation/docker-image-tags.test.ts b/tests/unit/documentation/docker-image-tags.test.ts index 8b9eb17ae..63c776e59 100644 --- a/tests/unit/documentation/docker-image-tags.test.ts +++ b/tests/unit/documentation/docker-image-tags.test.ts @@ -1,8 +1,9 @@ import { readFileSync } from 'node:fs'; -import { join } from 'node:path'; +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { describe, expect, it } from 'vitest'; -const repoRoot = join(import.meta.dirname, '..', '..', '..'); +const repoRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..'); const readme = readFileSync(join(repoRoot, 'README.md'), 'utf-8'); const installationGuide = readFileSync(join(repoRoot, 'docs', 'installation.md'), 'utf-8'); @@ -13,6 +14,8 @@ describe('published Docker image tags', () => { }); it('does not present the nonexistent :full tag as a published image', () => { - expect(readme).not.toContain('`:full` preinstalls the browser engine'); + for (const document of [readme, installationGuide]) { + expect(document).not.toContain('ghcr.io/knockoutez/wigolo:full'); + } }); });