diff --git a/commands.go b/commands.go index 16f97f12dd..30e0a82546 100644 --- a/commands.go +++ b/commands.go @@ -311,7 +311,7 @@ func (srv *Server) CmdHistory(stdin io.ReadCloser, stdout io.Writer, args ...str fmt.Fprintf(w, "%s\t%s\t%s\n", srv.runtime.repositories.ImageName(img.Id), HumanDuration(time.Now().Sub(img.Created))+" ago", - strings.Join(img.ParentCommand, " "), + strings.Join(img.ContainerConfig.Cmd, " "), ) return nil }) diff --git a/graph.go b/graph.go index c6bb30353a..fed19175ff 100644 --- a/graph.go +++ b/graph.go @@ -55,8 +55,8 @@ func (graph *Graph) Create(layerData Archive, container *Container, comment stri } if container != nil { img.Parent = container.Image - img.ParentContainer = container.Id - img.ParentCommand = append([]string{container.Path}, container.Args...) + img.Container = container.Id + img.ContainerConfig = *container.Config } if err := graph.Register(layerData, img); err != nil { return nil, err diff --git a/image.go b/image.go index 36bd839f5c..1a417a357b 100644 --- a/image.go +++ b/image.go @@ -19,8 +19,8 @@ type Image struct { Parent string `json:"parent,omitempty"` Comment string `json:"comment,omitempty"` Created time.Time `json:"created"` - ParentContainer string `json:"parent_container,omitempty"` - ParentCommand []string `json:"parent_command,omitempty"` + Container string `json:"container,omitempty"` + ContainerConfig Config `json:"container_config,omitempty"` graph *Graph }