From 6e6a38b4168ed7a528614f6499783243a8668395 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 22 Jan 2021 14:09:55 +0100 Subject: podman manifest exists Add podman manifest exists command with remote support. Signed-off-by: Paul Holzinger --- libpod/image/manifests.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libpod/image') diff --git a/libpod/image/manifests.go b/libpod/image/manifests.go index 14f7c2f83..1ae3693c9 100644 --- a/libpod/image/manifests.go +++ b/libpod/image/manifests.go @@ -46,6 +46,15 @@ func (i *Image) InspectManifest() (*manifest.Schema2List, error) { return list.Docker(), nil } +// ExistsManifest checks if a manifest list exists +func (i *Image) ExistsManifest() (bool, error) { + _, err := i.getManifestList() + if err != nil { + return false, err + } + return true, nil +} + // RemoveManifest removes the given digest from the manifest list. func (i *Image) RemoveManifest(d digest.Digest) (string, error) { list, err := i.getManifestList() -- cgit v1.2.3-54-g00ecf