Merge pull request #2261 from unraid/fix-docker-listing-shows-apipa-ip

Fix: Docker listing could show APIPA IP
This commit is contained in:
tom mortensen
2025-06-17 16:21:19 -07:00
committed by GitHub
@@ -1178,7 +1178,7 @@ class DockerUtil {
public static function host() {
$port = static::port();
if (!$port) return '';
$port = lan_port($port,true)==0 && lan_port('wlan0') ? 'wlan0' : $port;
$port = lan_port($port,true)!=1 && lan_port('wlan0') ? 'wlan0' : $port;
return exec("ip -br -4 addr show $port scope global | sed -r 's/\/[0-9]+//g' | awk '{print $3;exit}'");
}
}