Files
fingerprint-chromium/README.md
T
rogee 311fd97275
Build and publish image / image (push) Successful in 13s
HH-707: skip existing image versions (#3)
2026-08-26 19:30:30 +08:00

53 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# fingerprint-chromium Docker
将 [adryfish/fingerprint-chromium](https://github.com/adryfish/fingerprint-chromium) 最新 Linux x86_64 安装包封装为 Docker 镜像。
容器始终通过 Xvfb 启动普通的有头 Chromium,不默认使用 `--headless`。上游仅处理了部分无头特征,因此不要把无头模式设为默认。
## 构建
需要 Docker、curl 和 jq:
```bash
./scripts/build.sh
```
指定上游 Chrome 版本或镜像名:
```bash
CHROME_VERSION=148.0.7778.215 ./scripts/build.sh my-registry/fingerprint-chromium
```
脚本从上游 GitHub Release 解析唯一的 Linux x86_64 压缩包,镜像 tag 使用完整 Chrome 版本。设置 `PUSH=true` 时,若仓库中不存在该版本标签则构建并推送,否则跳过。
## 运行
```bash
docker run --rm \
-p 127.0.0.1:9222:9222 \
-v fingerprint-profile:/data \
fingerprint-chromium:148.0.7778.215 \
--fingerprint=1000 \
about:blank
```
CDP 端口默认是 `9222`;不要直接暴露到公网。每个账号应使用独立的数据卷与 fingerprint seed。可通过 `SCREEN_SIZE` 调整虚拟显示器,例如 `1600x900x24`。
上游 Linux 包未携带 SUID sandbox,且普通 Docker runner 默认不允许 Chromium 使用 user namespace sandbox,因此入口使用 `--no-sandbox` 并以非 root 用户运行。镜像依赖容器边界隔离浏览器;访问不可信内容时应额外限制网络、文件挂载和容器权限。
## 自动发布
- Gitea Workflow:推送 `git.ipao.vip/rogee/fingerprint-chromium:<chrome-version>`,使用仓库 secret `REGISTRY_TOKEN`。
- GitHub Workflow:推送 `ghcr.io/rogeecn/fingerprint-chromium:<chrome-version>`,使用内置 `GITHUB_TOKEN`。
两个 Workflow 都会在 PR 中只构建验证,在 `main` 更新、每日定时任务或手动触发时构建并推送。仓库需要允许 Actions job token 写入 Packages。
## 验证
```bash
./tests/check.sh
docker run --rm fingerprint-chromium:148.0.7778.215 --version
```
本仓库只支持上游当前提供的 `linux/amd64` 安装包。