mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
'docker list' shows which processes are running (always false for now)
This commit is contained in:
parent
10ca2206e2
commit
95c6443c43
1 changed files with 2 additions and 2 deletions
|
@ -244,7 +244,7 @@ func (docker *Docker) CmdList(stdin io.ReadCloser, stdout io.Writer, args ...str
|
||||||
longestCol = 8
|
longestCol = 8
|
||||||
}
|
}
|
||||||
tpl := "%-16s %-*.*s %-6s %-25s %10s %-s\n"
|
tpl := "%-16s %-*.*s %-6s %-25s %10s %-s\n"
|
||||||
fmt.Fprintf(stdout, tpl, "ID", longestCol, longestCol, "CMD", "STATUS", "CREATED", "CHANGES", "LAYERS")
|
fmt.Fprintf(stdout, tpl, "ID", longestCol, longestCol, "CMD", "RUNNING", "CREATED", "CHANGES", "LAYERS")
|
||||||
for _, container := range docker.containers {
|
for _, container := range docker.containers {
|
||||||
var layers []string
|
var layers []string
|
||||||
for _, layer := range container.Layers {
|
for _, layer := range container.Layers {
|
||||||
|
@ -257,7 +257,7 @@ func (docker *Docker) CmdList(stdin io.ReadCloser, stdout io.Writer, args ...str
|
||||||
fmt.Fprintf(stdout, tpl,
|
fmt.Fprintf(stdout, tpl,
|
||||||
/* ID */ container.Id,
|
/* ID */ container.Id,
|
||||||
/* CMD */ longestCol, longestCol, container.CmdString(),
|
/* CMD */ longestCol, longestCol, container.CmdString(),
|
||||||
/* STATUS */ "?",
|
/* RUNNING */ fmt.Sprintf("%v", container.Running),
|
||||||
/* CREATED */ humanDuration(time.Now().Sub(container.Created)) + " ago",
|
/* CREATED */ humanDuration(time.Now().Sub(container.Created)) + " ago",
|
||||||
/* CHANGES */ fmt.Sprintf("%.1fM", float32(container.BytesChanged) / 1024 / 1024),
|
/* CHANGES */ fmt.Sprintf("%.1fM", float32(container.BytesChanged) / 1024 / 1024),
|
||||||
/* LAYERS */ strings.Join(layers, ", "))
|
/* LAYERS */ strings.Join(layers, ", "))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue