mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
Move remote API config out of daemon/
Signed-off-by: Solomon Hykes <solomon@docker.com>
This commit is contained in:
@@ -36,7 +36,6 @@ type Config struct {
|
||||
DisableNetwork bool
|
||||
EnableSelinuxSupport bool
|
||||
Context map[string][]string
|
||||
Sockets []string
|
||||
}
|
||||
|
||||
// InstallFlags adds command-line options to the top-level flag parser for
|
||||
@@ -59,7 +58,6 @@ func (config *Config) InstallFlags() {
|
||||
opts.IPVar(&config.DefaultIp, []string{"#ip", "-ip"}, "0.0.0.0", "Default IP address to use when binding container ports")
|
||||
opts.ListVar(&config.GraphOptions, []string{"-storage-opt"}, "Set storage driver options")
|
||||
// FIXME: why the inconsistency between "hosts" and "sockets"?
|
||||
opts.HostListVar(&config.Sockets, []string{"H", "-host"}, "The socket(s) to bind to in daemon mode\nspecified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.")
|
||||
opts.IPListVar(&config.Dns, []string{"#dns", "-dns"}, "Force Docker to use specific DNS servers")
|
||||
opts.DnsSearchListVar(&config.DnsSearch, []string{"-dns-search"}, "Force Docker to use specific DNS search domains")
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ type Daemon struct {
|
||||
containerGraph *graphdb.Database
|
||||
driver graphdriver.Driver
|
||||
execDriver execdriver.Driver
|
||||
Sockets []string
|
||||
}
|
||||
|
||||
// Install installs daemon capabilities to eng.
|
||||
@@ -851,7 +850,6 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
||||
sysInitPath: sysInitPath,
|
||||
execDriver: ed,
|
||||
eng: eng,
|
||||
Sockets: config.Sockets,
|
||||
}
|
||||
if err := daemon.checkLocaldns(); err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -66,7 +66,6 @@ func (daemon *Daemon) CmdInfo(job *engine.Job) engine.Status {
|
||||
v.Set("IndexServerAddress", registry.IndexServerAddress())
|
||||
v.Set("InitSha1", dockerversion.INITSHA1)
|
||||
v.Set("InitPath", initPath)
|
||||
v.SetList("Sockets", daemon.Sockets)
|
||||
if _, err := v.WriteTo(job.Stdout); err != nil {
|
||||
return job.Error(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user