Pass the WeaveDNS Domain into the proxy

instead of obtaining it via the http api
This commit is contained in:
Bryan Boreham committed 2018-01-29 15:55:36 +00:00
1 parent 86d2800b59
commit e7f30106c0
4 files changed
+7 -13

No files matched your search

+3 -3
View File
@@ -68,11 +68,11 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
if err != nil {
return err
}
if dnsDomain := i.proxy.getDNSDomain(); dnsDomain != "" {
if err := i.setHostname(container, hostname, dnsDomain); err != nil {
if !i.proxy.WithoutDNS {
if err := i.setHostname(container, hostname, i.proxy.DNSDomain); err != nil {
return err
}
if err := i.proxy.setWeaveDNS(hostConfig, hostname, dnsDomain); err != nil {
if err := i.proxy.setWeaveDNS(hostConfig, hostname, i.proxy.DNSDomain); err != nil {
return err
}
}