From dc94dbd3c17c9011fc1e851694a2190dcf6c2b3c Mon Sep 17 00:00:00 2001 From: baude Date: Tue, 2 Apr 2019 10:26:43 -0500 Subject: podman-remote image tree add the ability for the podman-remote client to be able to print an image tree. Signed-off-by: baude --- pkg/adapter/runtime_remote.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkg/adapter/runtime_remote.go') diff --git a/pkg/adapter/runtime_remote.go b/pkg/adapter/runtime_remote.go index 978c9ffd8..807a9ad8f 100644 --- a/pkg/adapter/runtime_remote.go +++ b/pkg/adapter/runtime_remote.go @@ -82,6 +82,7 @@ type remoteImage struct { Digest digest.Digest isParent bool Runtime *LocalRuntime + TopLayer string } // Container ... @@ -147,6 +148,7 @@ func imageInListToContainerImage(i iopodman.Image, name string, runtime *LocalRu Names: i.RepoTags, isParent: i.IsParent, Runtime: runtime, + TopLayer: i.TopLayer, } return &ContainerImage{ri}, nil } @@ -280,6 +282,11 @@ func (ci *ContainerImage) Dangling() bool { return len(ci.Names()) == 0 } +// TopLayer returns an images top layer as a string +func (ci *ContainerImage) TopLayer() string { + return ci.remoteImage.TopLayer +} + // TagImage ... func (ci *ContainerImage) TagImage(tag string) error { _, err := iopodman.TagImage().Call(ci.Runtime.Conn, ci.ID(), tag) -- cgit v1.2.3-54-g00ecf