diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/adapter/runtime_remote.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go index fef3986f1..12bf550f2 100644 --- a/pkg/adapter/runtime_remote.go +++ b/pkg/adapter/runtime_remote.go @@ -146,6 +146,7 @@ type remoteImage struct { InputName string Names []string Digest digest.Digest + Digests []digest.Digest isParent bool Runtime *LocalRuntime TopLayer string @@ -226,10 +227,15 @@ func imageInListToContainerImage(i iopodman.Image, name string, runtime *LocalRu if err != nil { return nil, err } + var digests []digest.Digest + for _, d := range i.Digests { + digests = append(digests, digest.Digest(d)) + } ri := remoteImage{ InputName: name, ID: i.Id, Digest: digest.Digest(i.Digest), + Digests: digests, Labels: i.Labels, RepoTags: i.RepoTags, RepoDigests: i.RepoTags, @@ -352,6 +358,11 @@ func (ci *ContainerImage) Digest() digest.Digest { return ci.remoteImage.Digest } +// Digests returns the image's digests +func (ci *ContainerImage) Digests() []digest.Digest { + return append([]digest.Digest{}, ci.remoteImage.Digests...) +} + // Labels returns a map of the image's labels func (ci *ContainerImage) Labels(ctx context.Context) (map[string]string, error) { return ci.remoteImage.Labels, nil |