summaryrefslogtreecommitdiff
path: root/pkg/adapter/runtime_remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/adapter/runtime_remote.go')
-rw-r--r--pkg/adapter/runtime_remote.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go
index 870e86896..12bf550f2 100644
--- a/pkg/adapter/runtime_remote.go
+++ b/pkg/adapter/runtime_remote.go
@@ -17,8 +17,8 @@ import (
"github.com/containers/buildah/imagebuildah"
"github.com/containers/buildah/pkg/formats"
- "github.com/containers/image/v4/docker/reference"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/docker/reference"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/remoteclientconfig"
iopodman "github.com/containers/libpod/cmd/podman/varlink"
@@ -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