1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Simplify the output of 'docker images' by removing the PARENT column

This commit is contained in:
Solomon Hykes 2013-04-11 12:11:41 -07:00
parent 54dfedc516
commit 79d934bfb0

View file

@ -577,7 +577,7 @@ func (srv *Server) CmdImages(stdin io.ReadCloser, stdout io.Writer, args ...stri
} }
w := tabwriter.NewWriter(stdout, 20, 1, 3, ' ', 0) w := tabwriter.NewWriter(stdout, 20, 1, 3, ' ', 0)
if !*quiet { if !*quiet {
fmt.Fprintln(w, "REPOSITORY\tTAG\tID\tCREATED\tPARENT") fmt.Fprintln(w, "REPOSITORY\tTAG\tID\tCREATED")
} }
var allImages map[string]*Image var allImages map[string]*Image
var err error var err error
@ -606,7 +606,6 @@ func (srv *Server) CmdImages(stdin io.ReadCloser, stdout io.Writer, args ...stri
/* TAG */ tag, /* TAG */ tag,
/* ID */ TruncateId(id), /* ID */ TruncateId(id),
/* CREATED */ HumanDuration(time.Now().Sub(image.Created)) + " ago", /* CREATED */ HumanDuration(time.Now().Sub(image.Created)) + " ago",
/* PARENT */ srv.runtime.repositories.ImageName(image.Parent),
} { } {
if idx == 0 { if idx == 0 {
w.Write([]byte(field)) w.Write([]byte(field))
@ -629,7 +628,6 @@ func (srv *Server) CmdImages(stdin io.ReadCloser, stdout io.Writer, args ...stri
/* TAG */ "<none>", /* TAG */ "<none>",
/* ID */ TruncateId(id), /* ID */ TruncateId(id),
/* CREATED */ HumanDuration(time.Now().Sub(image.Created)) + " ago", /* CREATED */ HumanDuration(time.Now().Sub(image.Created)) + " ago",
/* PARENT */ srv.runtime.repositories.ImageName(image.Parent),
} { } {
if idx == 0 { if idx == 0 {
w.Write([]byte(field)) w.Write([]byte(field))