Add pid to containers output
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
1d3349128e
commit
0470f0790e
4 changed files with 2 additions and 19 deletions
|
@ -45,9 +45,9 @@ func listContainers(context *cli.Context) {
|
|||
fatal(err.Error(), 1)
|
||||
}
|
||||
w := tabwriter.NewWriter(os.Stdout, 20, 1, 3, ' ', 0)
|
||||
fmt.Fprint(w, "ID\tPATH\tSTATUS\n")
|
||||
fmt.Fprint(w, "ID\tPATH\tSTATUS\tPID1\n")
|
||||
for _, c := range resp.Containers {
|
||||
fmt.Fprintf(w, "%s\t%s\t%s\n", c.Id, c.BundlePath, c.Status)
|
||||
fmt.Fprintf(w, "%s\t%s\t%s\n", c.Id, c.BundlePath, c.Status, c.Processes[0].Pid)
|
||||
}
|
||||
if err := w.Flush(); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue