lilydjwg / nvchecker

New version checker for software releases
MIT License
428 stars 69 forks source link

Fix container test for multi-arch images #246

Closed bianjp closed 10 months ago

bianjp commented 10 months ago

Fix #245

For multi-arch images, registry will return Manifest List instead of Image Manifest: https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list.

In this case, we should choose one manifest and then send another request to get its detail.

Unfortunately, it's quite hard to find the manifest matching with current CPU architecture and system (docker and Python use different enum values for architecture, for example docker uses amd64 while Python uses x86_64).

Simply choosing the first manifest should probably work for most cases.