Skip to content

Commit

Permalink
fix(taglist): bug when listing multi-arch images (#260)
Browse files Browse the repository at this point in the history
Support when registry server does not respect the [Manifest Specification](https://docs.docker.com/registry/spec/manifest-v2-2/#image-manifest-field-descriptions).
When the media type is `application/vnd.docker.distribution.manifest.list.v2+json` the response object must have a `layers` key, but sometimes you can have a `manifests` key...

fixes #260
  • Loading branch information
Joxit committed Sep 6, 2022
1 parent ad7c269 commit 57a1cf9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/docker-registry-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docker-registry-ui",
"version": "2.2.1",
"version": "2.2.2",
"scripts": {
"format": "npm run format-html && npm run format-js && npm run format-riot",
"format-html": "find src rollup rollup.config.js -name '*.html' -exec prettier --config .prettierrc -w --parser html {} \\;",
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/docker-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class DockerImage {
return;
}
self.ociImage = response.mediaType === 'application/vnd.oci.image.index.v1+json';
self.layers = self.ociImage ? response.manifests : response.layers;
self.layers = response.layers || response.manifests;
self.size = self.layers.reduce(function (acc, e) {
return acc + e.size;
}, 0);
Expand Down

0 comments on commit 57a1cf9

Please sign in to comment.