← Back to Pull requests

fix(lima): configure Docker host-gateway to reach the host #11414

Closed
unknown closed this pull request without merging on Nov 26, 2026 23:23 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 22:09 UTC
Author

Summary

Configure Docker's host-gateway-ips with the resolved host.lima.internal address before starting Moby on the Lima backend. This makes --add-host=host.docker.internal:host-gateway and Compose's equivalent extra_hosts entry reach services on the host instead of Docker's bridge inside the VM.

  • Preserve unrelated daemon settings and explicit host-gateway-ip / host-gateway-ips overrides.

  • Validate the resolved address before writing the configuration.

  • Add unit coverage for IPv4/IPv6, custom addresses, overrides, invalid resolution, and read failures.

  • Add a Lima/Moby BATS regression that checks the mapped address after the existing fresh-install startup.
  • Closes #7611. Addresses the host-gateway portion of #7035; Windows and gateway.docker.internal are outside this change.

    The approach follows Colima's host-gateway configuration. Rancher uses its existing daemon JSON instead of Colima's systemd override. The setting is written before startService('docker'), avoiding the first-boot ordering issue fixed by Colima #1097.

    Validation

  • Targeted Jest suites: backendHelper.spec.ts and lima.spec.ts — 43 tests passed.

  • tsc -p tsconfig.jest.json — passed.

  • Existing TypeScript lint runner on all changed TypeScript files — passed.

  • BATS lint script, ShellCheck, shfmt, and git diff --check — passed.

  • Live macOS test using disposable Docker-in-Docker daemons: the production helper method was transpiled from source, its VM executor resolved the address through the running Rancher VM, and its resulting daemon configuration was supplied to the isolated daemon. The unconfigured baseline mapped to the nested bridge and failed to reach a loopback-only HTTP service on the Mac. The configured daemon reached that service on first boot, through Compose extra_hosts, and after a daemon restart.
  • The running Rancher installation and its existing containers were not restarted or modified. The full application/BATS suite and live Linux testing were not run locally.

    Local dependency setup used the exact upstream node-forge v1.4.4 Git tag in a separate test dependency directory because the npm mirror did not yet contain its published package. Repository manifests and lockfile are unchanged.

    Diff: 299 lines (+224 / -75) across 3 files Reviewer: jandubois Review duration: 73m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 299 lines diff across 3 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #11414"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 63.2% (MEDIUM) · Higher = larger blast radius
    63.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.0% · Safe to merge
    25.0%