_(Docker LOG rotation)_:
:
=mk_option($dockercfg['DOCKER_LOG_ROTATION'], 'no', _('Disabled'))?>
=mk_option($dockercfg['DOCKER_LOG_ROTATION'], 'yes', _('Enabled'))?>
:help37
> By default LOG rotation is disabled and will create a single LOG file of unlimited size.
>
> Enable LOG rotation to limit the size of the LOG file and specify the number of files to keep in the rotation scheme.
:end
_(Docker LOG maximum file size)_:
:
=mk_option($dockercfg['DOCKER_LOG_SIZE'], '10m', '10 '._('MB'))?>
=mk_option($dockercfg['DOCKER_LOG_SIZE'], '20m', '20 '._('MB'))?>
=mk_option($dockercfg['DOCKER_LOG_SIZE'], '50m', '50 '._('MB'))?>
=mk_option($dockercfg['DOCKER_LOG_SIZE'], '100m', '100 '._('MB'))?>
=mk_option($dockercfg['DOCKER_LOG_SIZE'], '500m', '500 '._('MB'))?>
=mk_option($dockercfg['DOCKER_LOG_SIZE'], '1g', '1000 '._('MB'))?>
:help38
> Specifies the maximum LOG size. When exceeded LOG rotation will occur.
:end
_(Docker LOG number of files)_:
:
=mk_option($dockercfg['DOCKER_LOG_FILES'], '1', '1')?>
=mk_option($dockercfg['DOCKER_LOG_FILES'], '2', '2')?>
=mk_option($dockercfg['DOCKER_LOG_FILES'], '3', '3')?>
:help39
> Specifies the number of LOG files when LOG rotation is done.
:end
_(Template Authoring Mode)_:
:
=mk_option($dockercfg['DOCKER_AUTHORING_MODE'], 'no', _('No'))?>
=mk_option($dockercfg['DOCKER_AUTHORING_MODE'], 'yes', _('Yes'))?>
:help40
> If set to **Yes**, when creating/editing containers the interface will be present with some extra fields related to template authoring.
:end
_(Host access to custom networks)_:
:
=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], '', _('Disabled'))?>
=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], 'yes', _('Enabled'))?>
:help41
> Allows direct communication between the host and containers using a custom (macvlan) network.
> By default this is prohibited.
:end
_(Preserve user defined networks)_:
:
=mk_option($dockercfg['DOCKER_USER_NETWORKS'], 'remove', _('No'))?>
=mk_option($dockercfg['DOCKER_USER_NETWORKS'], 'preserve', _('Yes'))?>
:help42
> User created networks are networks created by the user outside of the GUI.
> By default user created networks are removed from Docker. This is done to prevent potential conflicts with the automatic generation of custom networks.
>
> Change this setting to preserve user defined networks, but it is the responsibility of the user to ensure these entries work correctly and are conflict free.
:end
$route):?>
$net = normalize($network);
$docker_auto = "DOCKER_AUTO_$net";
$docker_dhcp = "DOCKER_DHCP_$net";
?>
_(IPv4 custom network on interface)_ =$network?> (_(optional)_):
$auto = $dockercfg[$docker_auto]!='no';
$autoDisabled = $auto ? '':'disabled';
$dhcp = $dockercfg[$docker_dhcp] ?? false;
$dhcpDisabled = ($auto && $dhcp) ? '':'disabled';
$net = base_min($route);
$max = base_max($route);
$mask = explode('/',$route)[1];
$net_user = $dhcp ? base_min($dhcp) : $net;
$mask_user = $dhcp ? explode('/',$dhcp)[1] : $mask+1;
$size = pow(2,32-$mask_user);
switch (true) {
case ($mask < 16): $prefix = $net[0]; $box = 1; break;
case ($mask < 24): $prefix = $net[0].'.'.$net[1]; $box = 2; break;
case ($mask < 32): $prefix = $net[0].'.'.$net[1].'.'.$net[2]; $box = 3 ;break;
}
?>
:
>
**_(Subnet)_:** =$route?>
**_(Gateway)_:** =$gateway[$network]?>
=$autoDisabled?>>
**_(DHCP pool)_:**=$prefix?>.
for ($b=$box; $b<=3; $b++) {
switch ($b) {
case 1: $step = $size/65536%256; break;
case 2: $step = $size/256%256; break;
case 3: $step = $size%256; break;
}
if ($step===0) $step = 256;
echo "
";
for ($n=$net[$b]; $n<=$max[$b]; $n++) echo mk_option($net_user[$b],$n,$n,$n%$step==0?'':'class="hide"');
echo " ";
}
echo "/ ";
echo "
";
for ($m=$mask+1; $m<=30; $m++) echo mk_option($mask_user,$m,$m);
echo " ($size "._('hosts').") ";
echo "
";
?>
:help43
> Include (default) or exclude the above interfaces or VLANs as custom network for Docker.
>
> Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25
:end
$port = normalize($network);
list($subnet,$mask) = explode('/',$dockercfg["DOCKER_SUBNET_$port"]);
list($range,$size) = explode('/',$dockercfg["DOCKER_RANGE_$port"]);
$disabled = $subnet ? '':'disabled';
$dhcpDisabled = $range ? '':'disabled';
?>
_(IPv4 custom network on interface)_ =$network?> (_(optional)_):
:
>
**_(Subnet)_:** >/
>
**_(Gateway)_:** " title="_(IPv4 address A.B.C.D)_"=$disabled?>>
=$dhcpDisabled?>>
**_(DHCP pool)_:** >/
>
(=pow(2,32-($size?:25))?> _(hosts)_)
:help44
> Include or exclude (default) the above interfaces or VLANs as custom network for Docker.
>
> Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25
:end
$route):?>
$net = normalize($network);
$docker_auto = "DOCKER_AUTO_$net";
$docker_dhcp6 = "DOCKER_DHCP6_$net";
?>
_(IPv6 custom network on interface)_ =$network?> (_(optional)_):
$auto6 = $dockercfg[$docker_auto]!='no';
$auto6Disabled = $auto6 ? '':'disabled';
$dhcp6 = $dockercfg[$docker_dhcp6] ?? false;
$dhcp6Disabled = ($auto6 && $dhcp6) ? '':'disabled';
$net = base_net($route);
$mask = explode('/',$route)[1];
$net_user = $dhcp6 ? str_replace("$net:","",base_net($dhcp6)) : '';
$mask_user = $dhcp6 ? explode('/',$dhcp6)[1] : $mask;
?>
:
>
**_(Subnet)_:** =$route?>
**_(Gateway)_:** =$gateway6[$network]?>
=$auto6Disabled?>>
**_(DHCP pool)_:**=$net?>:
echo " / ";
echo "";
for ($m=$mask+8; $m<=120; $m+=8) echo mk_option($mask_user,$m,$m);
echo " ";
?>
:help45
> Include (default) or exclude the above interfaces or VLANs as custom network for Docker.
>
> Enter the pool range within each allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/72
:end
$port = normalize($network);
list($subnet6,$mask6) = explode('/',$dockercfg["DOCKER_SUBNET6_$port"]);
list($range6,$size6) = explode('/',$dockercfg["DOCKER_RANGE6_$port"]);
$disabled = $subnet6 ? '':'disabled';
$dhcpDisabled = $range6 ? '':'disabled';
?>
_(IPv6 custom network on interface)_ =$network?> (_(optional)_):
:
>
**_(Subnet)_:** >/
>
**_(Gateway)_:** " title="_(IPv6 address nnnn:xxxx::yyyy)_"=$disabled?>>
=$dhcpDisabled?>>
**_(DHCP pool)_:** >/
>
:help46
> Include or exclude (default) the above interfaces or VLANs as custom network for Docker.
>
> Enter the pool range within each allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/72
:end
_(Docker version)_:
: $arrInfo = $DockerClient->getInfo(); echo $arrInfo['Version']?>
:help47
> This is the active Docker version.
:end
_(Docker vDisk location)_:
: =$dockercfg['DOCKER_IMAGE_FILE']?>
:help48
> This is the location of the Docker image.
:end
_(Default appdata storage location)_:
: =$dockercfg['DOCKER_APP_CONFIG_PATH']?>
:help49
> This is the storage location for Docker containers.
:end
_(Docker LOG rotation)_:
: =$dockercfg['DOCKER_LOG_ROTATION']=='yes' ? _('Enabled') : _('Disabled')?>
:help50
> By default a single unlimited LOG file is created. Otherwise LOG file size and number of files are limited when LOG rotation is enabled.
:end
_(Host access to custom networks)_:
: =$dockercfg['DOCKER_ALLOW_ACCESS']=='' ? _('Disabled') : _('Enabled')?>
:help51
> Allows direct communication between the host and containers using a custom (macvlan) network.
> By default this is prohibited.
:end
_(Preserve user defined networks)_:
: =$dockercfg['DOCKER_USER_NETWORKS']=='preserve' ? _('Yes') : _('No')?>
:help52
> Shows whether networks created outside of the GUI are removed or preserved for Docker. When preserved *user defined networks* become available in the *Network type* dropdown list of containers.
:end
$route):?>
$net = normalize($network);
$docker_dhcp = "DOCKER_DHCP_$net";
?>
_(IPv4 custom network on interface)_ =$network?>:
: **_(Subnet)_:** =$route?>
**_(Gateway)_:** =$gateway[$network]?>
**_(DHCP pool)_:** =$dockercfg[$docker_dhcp] ?? '_ (not set)_'?> (=pow(2,32-explode('/',$dockercfg[$docker_dhcp])[1])?> _(hosts)_)
$port = normalize($network);
list($eth,$vlan) = explode('.',$network);
$eth = str_replace(['bond','br'],'eth',$eth);
if (!$vlan) {
$protocol = $$eth['PROTOCOL:0'] ?? 'ipv4';
} else {
foreach ($$eth as $key => $value) {
if (strpos($key,'VLANID')!==false && $value==$vlan) {$protocol = $$eth[str_replace('VLANID','PROTOCOL',$key)] ?? 'ipv4'; break;}
}
}
list($subnet,$mask) = explode('/',$dockercfg["DOCKER_SUBNET_$port"]);
list($range,$size) = explode('/',$dockercfg["DOCKER_RANGE_$port"]);
?>
_(IPv4 custom network on interface)_ =$network?>:
: **_(Subnet)_:** =$subnet?>/=$mask?>
**_(Gateway)_:** =$dockercfg["DOCKER_GATEWAY_$port"]?>
**_(DHCP pool)_:** =$range ? "$range/$size" : "_(not set)_"?> (=pow(2,32-($size?:25))?> _(hosts)_)
$route):?>
$net = normalize($network);
$docker_dhcp6 = "DOCKER_DHCP6_$net";
if ($dockercfg[$docker_dhcp6] || empty($dockercfg["DOCKER_AUTO_$net"])):?>
$wide = true;?>
_(IPv6 custom network on interface)_ =$network?>:
: **_(Subnet)_:** =$route?>
**_(Gateway)_:** =$gateway6[$network]?>
**_(DHCP pool)_:** =$dockercfg[$docker_dhcp6] ?? '_(not set)_'?>
$port = normalize($network);
list($eth,$vlan) = explode('.',$network);
$eth = str_replace(['bond','br'],'eth',$eth);
if (!$vlan) {
$protocol = $$eth['PROTOCOL:0'] ?? 'ipv4';
} else {
foreach ($$eth as $key => $value) {
if (strpos($key,'VLANID')!==false && $value==$vlan) {$protocol = $$eth[str_replace('VLANID','PROTOCOL',$key)] ?? 'ipv4'; break;}
}
}
list($subnet6,$mask6) = explode('/',$dockercfg["DOCKER_SUBNET6_$port"]);
list($range6,$size6) = explode('/',$dockercfg["DOCKER_RANGE6_$port"]);
?>
_(IPv6 custom network on interface)_ =$network?>:
: **_(Subnet)_:** =$subnet6?>/=$mask6?>
**_(Gateway)_:** =$dockercfg["DOCKER_GATEWAY6_$port"]?>
**_(DHCP pool)_:** =$range6 ? "$range6/$size6" : "_(not set)_"?>
: