Skip to content

Commit

Permalink
fix podman load oci-archive use name
Browse files Browse the repository at this point in the history
Signed-off-by: zhangguanzhang <[email protected]>
  • Loading branch information
zhangguanzhang committed Aug 19, 2020
1 parent 8c16c7d commit 307fa19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions oci/layout/oci_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ func (ref ociReference) getManifestDescriptor() (imgspecv1.Descriptor, error) {
if !ok {
continue
}
// length is 1, could use the name to override it in podman
if len(index.Manifests) == 1 {
index.Manifests[0].Annotations[imgspecv1.AnnotationRefName] = ref.image
d = &index.Manifests[0]
break
}
if refName == ref.image {
d = &md
break
Expand Down

0 comments on commit 307fa19

Please sign in to comment.