summaryrefslogtreecommitdiff
path: root/libpod/image/manifests.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-01-22 14:09:55 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-01-22 20:19:13 +0100
commit6e6a38b4168ed7a528614f6499783243a8668395 (patch)
tree4389f13d6407233e77c84d3557f63bc0fdbc51b2 /libpod/image/manifests.go
parentf02aba659447ea9198851231d7f11a8bfdfe69ba (diff)
downloadpodman-6e6a38b4168ed7a528614f6499783243a8668395.tar.gz
podman-6e6a38b4168ed7a528614f6499783243a8668395.tar.bz2
podman-6e6a38b4168ed7a528614f6499783243a8668395.zip
podman manifest exists
Add podman manifest exists command with remote support. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/image/manifests.go')
-rw-r--r--libpod/image/manifests.go9
1 files changed, 9 insertions, 0 deletions
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()