Added docker autostart wait period

- fixed autostart entries sometimes wrongly sorted
This commit is contained in:
bergware
2018-08-05 13:34:46 +02:00
parent 894a2b2375
commit 9c0cff4782
4 changed files with 69 additions and 38 deletions

View File

@@ -38,6 +38,10 @@ $driver = DockerUtil::driver();
$docker_cfgfile = '/boot/config/docker.cfg';
$dockercfg = parse_ini_file($docker_cfgfile);
function var_split($item, $i=0) {
return explode(' ',$item)[$i];
}
#######################################
## DOCKERTEMPLATES CLASS ##
#######################################
@@ -257,7 +261,7 @@ class DockerTemplates {
$DockerUpdate = new DockerUpdate();
//$DockerUpdate->verbose = $this->verbose;
$info = DockerUtil::loadJSON($dockerManPaths['webui-info']);
$autoStart = @file($dockerManPaths['autostart-file'], FILE_IGNORE_NEW_LINES) ?: [];
$autoStart = array_map('var_split', @file($dockerManPaths['autostart-file'], FILE_IGNORE_NEW_LINES) ?: []);
foreach ($DockerClient->getDockerContainers() as $ct) {
$name = $ct['Name'];
$image = $ct['Image'];