Merge pull request #1837 from ich777/docker_fix

Make sure to not show internal IP from stopped containers
This commit is contained in:
tom mortensen
2024-08-29 01:25:29 -07:00
committed by GitHub

View File

@@ -98,7 +98,7 @@ foreach ($containers as $ct) {
}
foreach($ct['Networks'] as $netName => $netVals) {
$networks[] = $netName;
$network_ips[] = $netVals['IPAddress'];
$network_ips[] = $running ? $netVals['IPAddress'] : null;
if (isset($ct['Networks']['host'])) {
$ports_external[] = sprintf('%s', $netVals['IPAddress']);