From a8ee64b0596ffc0a8df369e88d1115b80afb04fa Mon Sep 17 00:00:00 2001 From: neilpang Date: Sat, 10 Jun 2017 15:07:45 +0800 Subject: [PATCH] running proxy on host network --- nginx.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.tmpl b/nginx.tmpl index a5b1d32..9d7faef 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -108,7 +108,7 @@ upstream {{ $upstream_name }} { {{ range $knownNetwork := $CurrentContainer.Networks }} {{ range $containerNetwork := $container.Networks }} - {{ if eq $knownNetwork.Name $containerNetwork.Name }} + {{ if or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host") }} ## Can be connect with "{{ $containerNetwork.Name }}" network {{/* If only 1 port exposed, use that */}}