mirror of
https://github.com/unraid/webgui.git
synced 2026-03-12 22:09:53 -05:00
Suppress Docker PHP error if container has no ports exposed or utilized
This commit is contained in:
@@ -710,6 +710,7 @@ class DockerClient {
|
||||
$nat = false;
|
||||
}
|
||||
$ip = $ct['NetworkSettings']['Networks'][$c['NetworkMode']]['IPAddress'];
|
||||
$ports = is_array($ports) ? $ports : array();
|
||||
foreach ($ports as $port => $value) {
|
||||
list($PrivatePort, $Type) = explode('/', $port);
|
||||
$c['Ports'][] = ['IP' => $ip, 'PrivatePort' => $PrivatePort, 'PublicPort' => $nat ? $value[0]['HostPort']:$PrivatePort, 'NAT' => $nat, 'Type' => $Type ];
|
||||
|
||||
Reference in New Issue
Block a user