Merge pull request #139 from jmccann/dns_search
Add ability to define DNS Search for docker daemon
This commit is contained in:
commit
7636c99bb6
6
main.go
6
main.go
@ -70,6 +70,11 @@ func main() {
|
|||||||
Usage: "docker daemon dns server",
|
Usage: "docker daemon dns server",
|
||||||
EnvVar: "PLUGIN_CUSTOM_DNS",
|
EnvVar: "PLUGIN_CUSTOM_DNS",
|
||||||
},
|
},
|
||||||
|
cli.StringSliceFlag{
|
||||||
|
Name: "daemon.dns-search",
|
||||||
|
Usage: "docker daemon dns search domains",
|
||||||
|
EnvVar: "PLUGIN_CUSTOM_DNS_SEARCH",
|
||||||
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "daemon.insecure",
|
Name: "daemon.insecure",
|
||||||
Usage: "docker daemon allows insecure registries",
|
Usage: "docker daemon allows insecure registries",
|
||||||
@ -205,6 +210,7 @@ func run(c *cli.Context) error {
|
|||||||
Debug: c.Bool("daemon.debug"),
|
Debug: c.Bool("daemon.debug"),
|
||||||
Bip: c.String("daemon.bip"),
|
Bip: c.String("daemon.bip"),
|
||||||
DNS: c.StringSlice("daemon.dns"),
|
DNS: c.StringSlice("daemon.dns"),
|
||||||
|
DNSSearch: c.StringSlice("daemon.dns-search"),
|
||||||
MTU: c.String("daemon.mtu"),
|
MTU: c.String("daemon.mtu"),
|
||||||
Experimental: c.Bool("daemon.experimental"),
|
Experimental: c.Bool("daemon.experimental"),
|
||||||
},
|
},
|
||||||
|
@ -26,6 +26,7 @@ type (
|
|||||||
Debug bool // Docker daemon started in debug mode
|
Debug bool // Docker daemon started in debug mode
|
||||||
Bip string // Docker daemon network bridge IP address
|
Bip string // Docker daemon network bridge IP address
|
||||||
DNS []string // Docker daemon dns server
|
DNS []string // Docker daemon dns server
|
||||||
|
DNSSearch []string // Docker daemon dns search domain
|
||||||
MTU string // Docker daemon mtu setting
|
MTU string // Docker daemon mtu setting
|
||||||
IPv6 bool // Docker daemon IPv6 networking
|
IPv6 bool // Docker daemon IPv6 networking
|
||||||
Experimental bool // Docker daemon enable experimental mode
|
Experimental bool // Docker daemon enable experimental mode
|
||||||
@ -301,6 +302,9 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
|
|||||||
for _, dns := range daemon.DNS {
|
for _, dns := range daemon.DNS {
|
||||||
args = append(args, "--dns", dns)
|
args = append(args, "--dns", dns)
|
||||||
}
|
}
|
||||||
|
for _, dnsSearch := range daemon.DNSSearch {
|
||||||
|
args = append(args, "--dns-search", dnsSearch)
|
||||||
|
}
|
||||||
if len(daemon.MTU) != 0 {
|
if len(daemon.MTU) != 0 {
|
||||||
args = append(args, "--mtu", daemon.MTU)
|
args = append(args, "--mtu", daemon.MTU)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user