mirror of
https://github.com/katanemo/plano.git
synced 2026-05-21 13:55:15 +02:00
`--add-host host.docker.internal:host-gateway` works on Docker Desktop and standard Docker Engine but not on Rancher Desktop, where the `host-gateway` keyword is not recognised. Introduce `_get_host_ip()` which reads the gateway of the Docker bridge network (e.g. 172.17.0.1) — a portable, concrete IP that works across Docker Desktop, Docker Engine, and Rancher Desktop. If the network inspect fails for any reason the function falls back to `host-gateway`, preserving the existing behaviour for standard installations. Also add unit tests covering the success path, subprocess failure, and empty-output fallback. |
||
|---|---|---|
| .. | ||
| source | ||
| __init__.py | ||
| test_config_generator.py | ||
| test_docker_cli.py | ||
| test_init.py | ||
| test_trace_cmd.py | ||
| test_version_check.py | ||