Skip to content

feat(mobile): auto-install Docker for Android container backend - #511

Open
miaowmint wants to merge 5 commits into
TencentCloud:developfrom
miaowmint:feat/auto-install-docker
Open

feat(mobile): auto-install Docker for Android container backend#511
miaowmint wants to merge 5 commits into
TencentCloud:developfrom
miaowmint:feat/auto-install-docker

Conversation

@miaowmint

Copy link
Copy Markdown
Contributor
  • New docker_install.py: latency-race install sources (official download.docker.com + CN mirrors, no geo detection; official wins → no DOWNLOAD_URL override), run official get.docker.com script, probe Tencent Cloud registry mirror reachability and merge registry-mirrors into /etc/docker/daemon.json (backup kept) only after a fresh install.
  • install_mobile_stream: when Docker is missing on Linux with root/passwordless sudo, attempt the automatic install first and continue with the container install when the daemon is ready; otherwise fall back to the manual-install error.
  • i18n (backend en/zh + dashboard locales) and install-guide copy updated; CHANGELOG entry added.
  • Unit tests for source selection, daemon.json merge, probe, and the install stream branches (auto-install ok / fail / no-sudo).

Summary

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

  • make all passes locally
  • Added/updated tests

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

miaowmint and others added 5 commits September 1, 2026 00:14
- New docker_install.py: latency-race install sources (official
  download.docker.com + CN mirrors, no geo detection; official wins →
  no DOWNLOAD_URL override), run official get.docker.com script,
  probe Tencent Cloud registry mirror reachability and merge
  registry-mirrors into /etc/docker/daemon.json (backup kept) only
  after a fresh install.
- install_mobile_stream: when Docker is missing on Linux with
  root/passwordless sudo, attempt the automatic install first and
  continue with the container install when the daemon is ready;
  otherwise fall back to the manual-install error.
- i18n (backend en/zh + dashboard locales) and install-guide copy
  updated; CHANGELOG entry added.
- Unit tests for source selection, daemon.json merge, probe, and the
  install stream branches (auto-install ok / fail / no-sudo).
os.geteuid() does not exist on Windows, breaking mypy in CI. Reuse the existing octop.infra.utils.posix_compat.geteuid() shim like the rest of the codebase.
- Vendor install-docker.sh (official get.docker.com script with
  TencentOS / OpenCloudOS releasever mapping and mirror-domain rewrites)
  into scripts/linux/v1.0/ so unsupported-by-online-script distros still
  install and we never pipe the network straight into sh; wheel ships
  it via the existing **/*.sh package rule.
- auto_install_docker_stream runs the bundled script with the raced
  DOWNLOAD_URL env var instead of curl|sh (curl pipe used to swallow
  download failures).
- Error compatibility: classify script output tail against known
  failure modes (unsupported distro, no root, network/curl, package
  manager lock, GPG key, disk full, existing docker) and append a
  localized fix hint; dedicated messages for spawn failure, stalled
  output (read watchdog), and missing bundled script; restart-failure
  message now tells how to start Docker manually.
- Tests: error classification, bundled-script presence, missing-script
  stream, friendly-hint emission; full mobile suite green (57).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants