From 9f50809bcf03103b0ad3b259ac719711fe8d873d Mon Sep 17 00:00:00 2001 From: anjiawei Date: Fri, 2 Aug 2019 10:59:39 +0800 Subject: [PATCH] add image to conatiner view. Update issue: https://github.com/jesseduffield/lazydocker/issues/144 Co-Authored-By: Jesse Duffield --- pkg/commands/container.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/commands/container.go b/pkg/commands/container.go index c7faa01e..96a3a663 100644 --- a/pkg/commands/container.go +++ b/pkg/commands/container.go @@ -248,7 +248,9 @@ type ContainerCliStat struct { // GetDisplayStrings returns the dispaly string of Container func (c *Container) GetDisplayStrings(isFocused bool) []string { - return []string{c.GetDisplayStatus(), c.Name, c.GetDisplayCPUPerc()} + image := strings.TrimPrefix(c.Container.Image, "sha256:") + + return []string{c.GetDisplayStatus(), c.Name, c.GetDisplayCPUPerc(), utils.ColoredString(image, color.FgMagenta)} } // GetDisplayStatus returns the colored status of the container