feat: 多变体 Docker 镜像(with-browser / without-browser)#122
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
Docker 镜像变体
hangyi/weban:latest/with-browser(419MB):基于chromedp/headless-shell,内置 Chrome headless shell,开箱即用hangyi/weban:without-browser(164MB):基于debian:stable-slim,纯二进制,通过 CDP 连接宿主机浏览器两个变体共享同一个 Dockerfile 的 builder 阶段,CI 中通过
--target构建,GHA cache 复用。浏览器自动检测
按优先级自动检测,无需手动配置:
CHROMIUM_BINARY/browser_path)cdp_host+cdp_port,Docker 下自动尝试host.docker.internal:9222)CI 变更
variant×platform)latest/with-browser/<版本号>→ 内置浏览器,without-browser/<版本号>-without-browser→ 轻量镜像文件变更
Dockerfilewith-browser(chromedp/headless-shell)+without-browser(debian:stable-slim).github/workflows/build.ymlREADME.mdcaptcha.py_find_playwright_browser(),check_browser_health()实现完整优先级链main.py