Docker: honor user setting of stop time-out

This commit is contained in:
bergware
2022-12-30 13:20:07 +01:00
parent 2967e30bba
commit 6ce9bc9de3
4 changed files with 8 additions and 11 deletions

View File

@@ -780,10 +780,7 @@ class DockerClient {
public function stopContainer($id, $t=false) {
global $dockercfg;
if ( ! $t )
$t = intval($dockercfg['DOCKER_TIMEOUT']) ?: 10;
$this->getDockerJSON("/containers/$id/stop?t=$t", 'POST', $code);
$this->getDockerJSON("/containers/$id/stop?t=".($t?:$dockercfg['DOCKER_TIMEOUT']??10), 'POST', $code);
$this->flushCache($this::$containersCache);
return $code;
}