Using the client
$client = new Client();
$client->setUri('unix:///run/docker.sock:/v1.13/version');
$client->setOptions(array(
'maxredirects' => 0,
'timeout' => 30
));
$response = $client->send();
echo $response->getContent();
{"ApiVersion":"1.14","Arch":"amd64","GitCommit":"fa7b24f","GoVersion":"go1.3.1","KernelVersion":"3.16.1-1-ARCH","Os":"linux","Version":"1.2.0"}
Using the socket
$uri = new [...]
↧