Ver Fonte

fix #2310

Check the '.Internal' network property, because the .Gateway property is
defined for internal networks as well.
Gilles Filippini há 1 ano atrás
pai
commit
a2ade38abb
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      nginx.tmpl

+ 1 - 1
nginx.tmpl

@@ -75,7 +75,7 @@
                 {{- continue }}
             {{- end }}
             {{- range sortObjectsByKeysAsc $.globals.CurrentContainer.Networks "Name" }}
-                {{- if and . .Gateway }}
+                {{- if and . .Gateway (not .Internal) }}
     #         container is in host network mode, using {{ .Name }} gateway IP
                     {{- $ip = .Gateway }}
                     {{- break }}