add a bunch of debugging

This commit is contained in:
Christopher 2020-10-23 21:00:04 +02:00
parent ec67e1d947
commit bc1e5183dd
3 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,8 @@ FROM sahrea/webserver
WORKDIR /var/www/html
RUN touch /var/run/docker.sock && chmod 777 /var/run/docker.sock
COPY index.php /var/www/html/index.php
COPY style/ /var/www/html/style/

View File

@ -46,5 +46,9 @@
$rawOutput = curl_exec($this->CurlClient);
}
public function getError($container){
return curl_strerror(curl_errno($this->CurlClient));
}
}
?>

View File

@ -9,13 +9,14 @@ if(isset($_SESSION['LOGIN']))
$allContainers = $dockerClient->getAllContainers();
$container = NULL;
echo ("/".$_SESSION['CONATINER']);
foreach($allContainers as $thisContainer)
{
echo $thisContainer['id']." == ".$thisContainer['Names'][0]."\n";
echo $thisContainer['Id']." == ".$thisContainer['Names'][0]."\n";
if($thisContainer['id'] == $_SESSION['CONATINER'] || $thisContainer['Names'][0] == ("/".$_SESSION['CONATINER']))
if($thisContainer['Id'] == $_SESSION['CONATINER'] || $thisContainer['Names'][0] == ("/".$_SESSION['CONATINER']))
$container = $thisContainer;
}
if($container == NULL)