Added CPU selection to docker container edit section

This commit is contained in:
bergware
2018-08-08 17:23:22 +02:00
parent 9c0cff4782
commit 9d683de94c
3 changed files with 66 additions and 4 deletions

View File

@@ -269,6 +269,7 @@ class DockerTemplates {
$tmp['running'] = $ct['Running'];
$tmp['paused'] = $ct['Paused'];
$tmp['autostart'] = in_array($name, $autoStart);
$tmp['cpuset'] = $ct['CPUset'];
if (!is_file($tmp['icon']) || $reload) $tmp['icon'] = $this->getIcon($image);
if ($ct['Running']) {
$port = &$ct['Ports'][0];
@@ -725,6 +726,7 @@ class DockerClient {
$c['Volumes'] = $info['HostConfig']['Binds'];
$c['Created'] = $this->humanTiming($ct['Created']);
$c['NetworkMode'] = $ct['HostConfig']['NetworkMode'];
$c['CPUset'] = $info['HostConfig']['CpusetCpus'];
$c['BaseImage'] = $ct['Labels']['BASEIMAGE'] ?? false;
$c['Ports'] = [];
if ($driver[$c['NetworkMode']]=='bridge') {