소스 검색

fix #2310

Check the '.Internal' network property, because the .Gateway property is
defined for internal networks as well.
Gilles Filippini 1 년 전
부모
커밋
a2ade38abb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 }}