コード例 #1
0
ファイル: DockerClient.php プロジェクト: roninkenji/dynamix
	public function getUpdateStatus($container, $image) {
		$DockerTemplates = new DockerTemplates();
		$RegistryUrl     = $DockerTemplates->getTemplateValue($image, "Registry");
		$userFile        = $DockerTemplates->getUserTemplate($container);
		$localVersion    = $this->getLocalVersion($userFile);
		$remoteVersion   = $this->getRemoteVersion($RegistryUrl, $image);
		// echo "\n $localVersion => $remoteVersion";
		return ($localVersion && $remoteVersion) ? (($remoteVersion == $localVersion) ? "true" : "false") : "undef" ;
	}
コード例 #2
0
ファイル: CreateDocker.php プロジェクト: roninkenji/dynamix
  // Injecting the command in $_GET variable and executing.
  $_GET['cmd'] = $cmd;
  include($dockerManPaths['plugin'] . "/include/Exec.php");

  $DockerTemplates->removeInfo($Name);
  $DockerUpdate->syncVersions($Name);

  echo '<center><input type="button" value="Done" onclick="done()"></center><br>';
  die();
}


if ($_GET['updateContainer']){
  foreach ($_GET['ct'] as $value) {
    $Name = urldecode($value);
    $tmpl = $DockerTemplates->getUserTemplate($Name);

    if (! $tmpl){
      echo 'Configuration not found. Was this container created using this plugin?';
      continue;
    }

    $doc = new DOMDocument('1.0', 'utf-8');
    $doc->preserveWhiteSpace = false;
    $doc->load( $tmpl );
    $doc->formatOutput = TRUE;

    $Repository = $doc->getElementsByTagName( "Repository" )->item(0)->nodeValue;
    $Registry = $doc->getElementsByTagName( "Registry" )->item(0)->nodeValue;

    readfile("/usr/local/emhttp/plugins/dynamix.docker.manager/log.htm");