/** * Inspect a container * * @param \Docker\Container $container * * @throws \GuzzleHttp\Exception\RequestException * @throws \Docker\Exception\ContainerNotFoundException * * @return array json data from docker inspect */ public function inspect(Container $container) { try { $response = $this->client->get(['/containers/{id}/json', ['id' => $container->getId()]]); } catch (RequestException $e) { if ($e->hasResponse() && $e->getResponse()->getStatusCode() == "404") { throw new ContainerNotFoundException($container->getId(), $e); } throw $e; } $container->setRuntimeInformations($response->json()); return $response->json(); }