mirror of
https://github.com/docker/compose.git
synced 2026-08-31 14:52:42 +00:00
Backend is responsible for generating containers IDs and truncate them if wanted/supported for docker ps
This commit is contained in:
parent
e604e7efc9
commit
f1a5f2d6cf
3 changed files with 8 additions and 3 deletions
|
|
@ -6,7 +6,6 @@ import (
|
|||
"os"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
|
|
@ -58,7 +57,7 @@ func runPs(ctx context.Context, opts psOpts) error {
|
|||
fmt.Fprintf(w, "CONTAINER ID\tIMAGE\tCOMMAND\tSTATUS\tPORTS\n")
|
||||
format := "%s\t%s\t%s\t%s\t%s\n"
|
||||
for _, c := range containers {
|
||||
fmt.Fprintf(w, format, stringid.TruncateID(c.ID), c.Image, c.Command, c.Status, formatter.PortsString(c.Ports))
|
||||
fmt.Fprintf(w, format, c.ID, c.Image, c.Command, c.Status, formatter.PortsString(c.Ports))
|
||||
}
|
||||
|
||||
return w.Flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue