Bugfixes
* Fixed a bug where the lockfile would be released on exit even if it wasn't locked by the process * Disabled the phpx build as it is broken
This commit is contained in:
@ -23,7 +23,11 @@ class RegistryV2Client
|
||||
|
||||
public function getManifest(string $image, string $tag)
|
||||
{
|
||||
$response = $this->client->get("{$image}/manifests/{$tag}");
|
||||
$response = $this->client->get("{$image}/manifests/{$tag}", [
|
||||
'headers' => [
|
||||
//'Accept' => 'application/vnd.docker.distribution.manifest.v2+json',
|
||||
]
|
||||
]);
|
||||
$body = $response->getBody();
|
||||
return json_decode($body);
|
||||
}
|
||||
@ -32,12 +36,16 @@ class RegistryV2Client
|
||||
{
|
||||
$manifest = $this->getManifest($image, $tag);
|
||||
|
||||
$fslayers = (array)$manifest->fsLayers;
|
||||
$fshashes = array_map(fn($layer) => $layer->blobSum, $fslayers);
|
||||
//print_r($manifest);
|
||||
|
||||
$fslayers = (array)(($manifest->fsLayers??$manifest->layers)??[]);
|
||||
$fshashes = array_map(fn($layer) => $layer->blobSum??$layer->digest, $fslayers);
|
||||
$metahash = hash("sha256", join("|", $fshashes));
|
||||
|
||||
$history = $manifest->history[0];
|
||||
$info = json_decode($history->v1Compatibility);
|
||||
if (isset($manifest->history)) {
|
||||
$history = $manifest->history[0];
|
||||
$info = json_decode($history->v1Compatibility);
|
||||
}
|
||||
|
||||
return [
|
||||
'image' => $image,
|
||||
|
Reference in New Issue
Block a user