|
@@ -29,7 +29,6 @@ import (
|
|
|
"reflect"
|
|
|
"regexp"
|
|
|
"runtime"
|
|
|
- "sort"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"syscall"
|
|
@@ -1279,19 +1278,6 @@ func (cli *DockerCli) printTreeNode(noTrunc bool, image *engine.Env, prefix stri
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func displayablePorts(ports *engine.Table) string {
|
|
|
- result := []string{}
|
|
|
- for _, port := range ports.Data {
|
|
|
- if port.Get("IP") == "" {
|
|
|
- result = append(result, fmt.Sprintf("%d/%s", port.GetInt("PublicPort"), port.Get("Type")))
|
|
|
- } else {
|
|
|
- result = append(result, fmt.Sprintf("%s:%d->%d/%s", port.Get("IP"), port.GetInt("PublicPort"), port.GetInt("PrivatePort"), port.Get("Type")))
|
|
|
- }
|
|
|
- }
|
|
|
- sort.Strings(result)
|
|
|
- return strings.Join(result, ", ")
|
|
|
-}
|
|
|
-
|
|
|
func (cli *DockerCli) CmdPs(args ...string) error {
|
|
|
cmd := cli.Subcmd("ps", "[OPTIONS]", "List containers")
|
|
|
quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only display numeric IDs")
|