From 6e8f719572358347b3126426b379876b846607e3 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 6 Mar 2026 14:19:24 +0100 Subject: [PATCH] Provide ExecIdStartPostBody Otherwise podman responds with "400 Bad Request" if the endpoint https://docs.docker.com/reference/api/engine/version/v1.45/#tag/Exec/operation/ExecStart is called. --- src/Container/StartedGenericContainer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Container/StartedGenericContainer.php b/src/Container/StartedGenericContainer.php index 6e2acdd..c251114 100644 --- a/src/Container/StartedGenericContainer.php +++ b/src/Container/StartedGenericContainer.php @@ -64,8 +64,11 @@ public function exec(array $command): string $this->lastExecId = $exec->getId(); + $startConfig = new ExecIdStartPostBody(); + $startConfig->setDetach(false); + $contents = $this->dockerClient - ->execStart($this->lastExecId, null, Client::FETCH_RESPONSE) + ->execStart($this->lastExecId, $startConfig, Client::FETCH_RESPONSE) ?->getBody() ->getContents() ?? '';