From a2ade38abb111aece48a5c120650a4cdf2a607ac Mon Sep 17 00:00:00 2001 From: Gilles Filippini Date: Tue, 19 Dec 2023 19:20:56 +0100 Subject: [PATCH] fix #2310 Check the '.Internal' network property, because the .Gateway property is defined for internal networks as well. --- nginx.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index f830fd2..66324ff 100644 --- a/nginx.tmpl +++ b/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 }}