feat(robustness): CN network adaptation + environment robustness#312
Open
Problemsolver0070 wants to merge 1 commit intoillbnm:masterfrom
Open
feat(robustness): CN network adaptation + environment robustness#312Problemsolver0070 wants to merge 1 commit intoillbnm:masterfrom
Problemsolver0070 wants to merge 1 commit intoillbnm:masterfrom
Conversation
…bnm#8) - Add scripts/setup-cn-mirrors.sh: interactive Docker mirror configuration - Add scripts/localize-images.sh: replace gcr.io/ghcr.io with CN mirrors - Add config/cn-mirrors.yml: complete image mirror mapping table - Add scripts/check-connectivity.sh: registry reachability detection - Add scripts/wait-healthy.sh: container health check waiter with diagnostics - Add scripts/diagnose.sh: one-click diagnostic report generator - Rewrite install.sh: auto Docker install (Ubuntu/Debian/CentOS/Arch), disk/memory checks, port conflict detection, firewall checks, curl retry with exponential backoff, user group management All scripts pass shellcheck with zero errors. Generated/reviewed with: claude-opus-4-6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
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.
Summary
Closes #8 — [BOUNTY $250] Robustness — 环境鲁棒性与国内网络适配
scripts/setup-cn-mirrors.sh— Interactive Docker mirror config for CN users. Tests mirror reachability, writes/etc/docker/daemon.json, verifies withdocker pull hello-worldscripts/localize-images.sh—--cn/--restore/--dry-run/--checkmodes to swap gcr.io/ghcr.io images in all compose filesconfig/cn-mirrors.yml— Complete image mapping table for all non-Docker Hub registriesscripts/check-connectivity.sh— Tests all registries + CN mirrors with latency, DNS, and port checksinstall.sh— Full rewrite: auto Docker install (Ubuntu/Debian/CentOS/Arch), Compose v2 check, disk/memory validation, port conflict detection, firewall rules check, curl retry with exponential backoff, user docker group managementscripts/wait-healthy.sh—--stack <name> --timeout <s>polls healthchecks, prints container logs on timeoutscripts/diagnose.sh— Generates full diagnostic report (system info, Docker status, container state, error logs, connectivity, port usage, config validation)All 6 scripts pass
shellcheckwith zero errors.Acceptance Criteria
check-connectivity.shaccurately detects registry reachabilitysetup-cn-mirrors.shconfigures Docker daemon mirrors interactivelylocalize-images.sh --cnreplaces all gcr.io/ghcr.io in compose fileslocalize-images.sh --restorefully restores from backupinstall.shhandles Docker not installed → auto-install (Ubuntu/Debian/CentOS/Arch)install.shhandles Docker Compose v1 → prompt upgrade to v2install.shdetects port conflicts (53/80/443/3000 etc.)install.shwarns on low disk (<20GB) and blocks on <5GBinstall.shwarns on low memory (<2GB)install.shhandles non-root users (auto docker group add)install.shchecks firewall rules (ufw/firewalld)install.shretries network requests with exponential backoffwait-healthy.shoutputs useful error info on timeoutdiagnose.shgenerates complete diagnostic reportshellcheckwith no errorsTest Plan
shellcheckon all scripts — verified zero errors./scripts/check-connectivity.sh— verify registry status output./scripts/localize-images.sh --dry-run— verify image replacements listed./scripts/localize-images.sh --cn && --restorecycle — verify roundtrip./scripts/diagnose.sh— verify full report generation./install.shon fresh Ubuntu 22.04 — verify full flow./install.shon existing Docker install — verify idempotentGenerated/reviewed with: claude-opus-4-6
🤖 Generated with Claude Code
Reviewed/verified with: GPT-5.3 Codex