From 4179f25286dde9f9e83bffa07c303373844b5ed2 Mon Sep 17 00:00:00 2001 From: Nan Monnand Deng Date: Mon, 1 Jul 2013 19:05:05 -0400 Subject: [PATCH] fixed #910. print user name to docker info output --- commands.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands.go b/commands.go index aa991811ca..9c59857ae1 100644 --- a/commands.go +++ b/commands.go @@ -495,6 +495,11 @@ func (cli *DockerCli) CmdInfo(args ...string) error { fmt.Fprintf(cli.out, "EventsListeners: %d\n", out.NEventsListener) fmt.Fprintf(cli.out, "Kernel Version: %s\n", out.KernelVersion) } + if cli.authConfig != nil { + fmt.Fprintf(cli.out, "Username: %v\n", cli.authConfig.Username) + // XXX Should we print registry address even if the user was not logged in? + fmt.Fprintf(cli.out, "Registry: %v\n", auth.IndexServerAddress()) + } if !out.MemoryLimit { fmt.Fprintf(cli.err, "WARNING: No memory limit support\n") }