Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2021-11-30 14:25:10 +01:00
parent 878baf4b8d
commit 7962ec5cb5

View file

@ -374,7 +374,7 @@ class DockerActionManager
$containerName = $container->GetIdentifier();
// schedule the exec
$url = $this->BuildApiUrl(sprintf('/containers/%s/exec', urlencode($containerName)));
$url = $this->BuildApiUrl(sprintf('containers/%s/exec', urlencode($containerName)));
$response = json_decode(
$this->guzzleClient->request(
'POST',
@ -391,14 +391,15 @@ class DockerActionManager
],
],
]
)->getBody()->getContents()
)->getBody()->getContents(),
true
);
// get the id from the response
$id = $response['Id'];
// start the exec
$url = $this->BuildApiUrl(sprintf('/exec/%s/start', $id));
$url = $this->BuildApiUrl(sprintf('exec/%s/start', $id));
$this->guzzleClient->request(
'POST',
$url,