@@ -8,6 +8,8 @@ function Get-Manifest([string]$token, [string]$image, $ref, $header, $registry =
88 $type = " manifest"
99
1010 if ($header -eq [DockerImageSpec ]::manifest_list) { $type = " docker manifest list" }
11+ if ($header -eq [OCIImageSpec ]::manifest_list) { $type = " oci manifest list" }
12+ if ($header -eq [OCIImageSpec ]::manifest) { $type = " oci manifest" }
1113
1214 Write-host " ==> Get [ $image $ref ] $type ..." - ForegroundColor Blue
1315
@@ -43,6 +45,8 @@ function Get-Manifest([string]$token, [string]$image, $ref, $header, $registry =
4345 $type = " oci manifest"
4446 }
4547
48+ Write-Host " ==> [Info] Try [ $image $ref ] $type ..." - ForegroundColor Blue
49+
4650 try {
4751 $result = Invoke-WebRequest `
4852 - Authentication OAuth `
@@ -63,7 +67,7 @@ function Get-Manifest([string]$token, [string]$image, $ref, $header, $registry =
6367 }
6468
6569 if ($result.Headers .' Content-Type' -ne $header ) {
66- Write-Host " ==> [error] Get [ $image $ref ] $type error" - ForegroundColor Red
70+ Write-Host " ==> [error] Get [ $image $ref ] $type error, find [ $ ( $result .Headers . ' Content-Type ' ) ] " - ForegroundColor Red
6771
6872 return $false
6973 }
@@ -110,3 +114,30 @@ Export-ModuleMember -Function Get-Manifest
110114# }
111115# ]
112116# }
117+
118+
119+ # {
120+ # "schemaVersion": 2,
121+ # "mediaType": "application/vnd.oci.image.index.v1+json",
122+ # "manifests": [
123+ # {
124+ # "mediaType": "application/vnd.oci.image.manifest.v1+json",
125+ # "size": 1598,
126+ # "digest": "sha256:e39f6119f134b4811af19fd5c20f495a6a264a85c1b6920daf569b23009dd42c",
127+ # "platform": {
128+ # "architecture": "amd64",
129+ # "os": "linux"
130+ # }
131+ # },
132+ # {
133+ # "mediaType": "application/vnd.oci.image.manifest.v1+json",
134+ # "size": 1598,
135+ # "digest": "sha256:a090c17d367f2686633f2be8a10cb1670ed1c12bb47c6e47ea0dde84a8512765",
136+ # "platform": {
137+ # "architecture": "arm",
138+ # "os": "linux",
139+ # "variant": "v7"
140+ # }
141+ # }
142+ # ]
143+ # }
0 commit comments