mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Added index address into APIInfo.
This commit is contained in:
parent
4179f25286
commit
303490168f
3 changed files with 28 additions and 24 deletions
|
@ -27,6 +27,7 @@ type APIInfo struct {
|
|||
LXCVersion string `json:",omitempty"`
|
||||
NEventsListener int `json:",omitempty"`
|
||||
KernelVersion string `json:",omitempty"`
|
||||
IndexServerAddress string `json:",omitempty"`
|
||||
}
|
||||
|
||||
type APITop struct {
|
||||
|
|
10
commands.go
10
commands.go
|
@ -495,10 +495,12 @@ 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 len(out.IndexServerAddress) != 0 {
|
||||
u := cli.configFile.Configs[out.IndexServerAddress].Username
|
||||
if len(u) > 0 {
|
||||
fmt.Fprintf(cli.out, "Username: %v\n", u)
|
||||
fmt.Fprintf(cli.out, "Registry: %v\n", out.IndexServerAddress)
|
||||
}
|
||||
}
|
||||
if !out.MemoryLimit {
|
||||
fmt.Fprintf(cli.err, "WARNING: No memory limit support\n")
|
||||
|
|
|
@ -275,6 +275,7 @@ func (srv *Server) DockerInfo() *APIInfo {
|
|||
LXCVersion: lxcVersion,
|
||||
NEventsListener: len(srv.events),
|
||||
KernelVersion: kernelVersion,
|
||||
IndexServerAddress: auth.IndexServerAddress(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue