diff --git a/plugins/dynamix.docker.manager/DockerSettings.page b/plugins/dynamix.docker.manager/DockerSettings.page index bfff6d71e..ed794fee4 100644 --- a/plugins/dynamix.docker.manager/DockerSettings.page +++ b/plugins/dynamix.docker.manager/DockerSettings.page @@ -13,8 +13,6 @@ Markdown="false" * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * - * Added custom network and IPv6 support - Bergware April 2017 */ ?> ".print_r($m, true).""; }; exec("docker network ls --filter driver='macvlan' --format='{{.Name}}'", $custom); $subnet = ['bridge'=>'', 'host'=>'', 'none'=>'']; -foreach ($custom as $network) { - $subnets = []; - $values = exec("docker network inspect --format='{{range .IPAM.Config}}{{.Subnet}} {{end}}' $network"); - foreach (explode(' ',$values) as $value) $subnets[] = strpos($value,':')===false ? "IPv4: $value" : "IPv6: $value"; - $subnet[$network] = implode(', ',$subnets); -} +foreach ($custom as $network) $subnet[$network] = exec("docker network inspect --format='{{range .IPAM.Config}}{{.Subnet}}{{end}}' $network"); function stopContainer($name) { global $DockerClient; @@ -373,7 +368,7 @@ function xmlToCommand($xml, $create_paths=false) { $cmdName = (strlen($xml['Name'])) ? '--name="'.$xml['Name'].'"' : ""; $cmdPrivileged = (strtolower($xml['Privileged']) == 'true') ? '--privileged="true"' : ""; $cmdNetwork = '--net="'.strtolower($xml['Network']).'"'; - $cmdMyIP = $xml['MyIP'] ? (strpos($xml['MyIP'],':')===false?'--ip="':'--ip6="').$xml['MyIP'].'"' : ''; + $cmdMyIP = $xml['MyIP'] ? '--ip="'.$xml['MyIP'].'"' : ''; $Volumes = ['']; $Ports = ['']; $Variables = ['']; @@ -1541,13 +1536,13 @@ $showAdditionalInfo = '';