diff --git a/plugins/dynamix.docker.manager/include/DockerClient.php b/plugins/dynamix.docker.manager/include/DockerClient.php index 14da8910f..f02271979 100644 --- a/plugins/dynamix.docker.manager/include/DockerClient.php +++ b/plugins/dynamix.docker.manager/include/DockerClient.php @@ -466,7 +466,7 @@ class DockerUpdate{ // Add :latest tag to image if it's absent $image = ($image && count(preg_split("#[:\/]#", $image)) < 3) ? "${image}:latest" : $image; if(isset($updateStatus[$image])) { - if ($updateStatus[$image]['local'] && $updateStatus[$image]['remote']) { + if ($updateStatus[$image]['local'] || $updateStatus[$image]['remote']) { return ($updateStatus[$image]['local'] == $updateStatus[$image]['remote']) ? true : false; } } diff --git a/plugins/dynamix.docker.manager/scripts/dockerupdate.php b/plugins/dynamix.docker.manager/scripts/dockerupdate.php index b5c5b7849..021fbfa53 100755 --- a/plugins/dynamix.docker.manager/scripts/dockerupdate.php +++ b/plugins/dynamix.docker.manager/scripts/dockerupdate.php @@ -45,8 +45,10 @@ if (!isset($check)) { $image = $ct['Image']; if ($info[$name]['updated'] == "false") { $updateStatus = (is_file($dockerManPaths['update-status'])) ? json_decode(file_get_contents($dockerManPaths['update-status']), TRUE) : array(); - $new = $updateStatus[$image]['remote']; - exec("$notify -e 'Docker - $name [$new]' -s 'Notice [$server] - Docker update $new' -d 'A new version of $name is available' -i 'normal $output' -x"); + $new = str_replace('sha256:', '', $updateStatus[$image]['remote']); + $new = substr($new, 0, 4).'..'.substr($new, -4, 4); + + exec("$notify -e ".escapeshellarg("Docker - $name [$new]")." -s ".escapeshellarg("Notice [$server] - Docker update $new")." -d ".escapeshellarg("A new version of $name is available")." -i ".escapeshellarg("normal $output")." -x"); } } }