cfsimplicity
02/23/2022, 5:08 PMfailed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
and then app1 could not be resolved (110: Operation timed out)
I tried changing the resolver in the nginx conf and various other suggestions on SO but to no avail.sknowlton
02/23/2022, 5:15 PMcfsimplicity
02/23/2022, 5:35 PM10.4.1.34 app1 app1.docker_internal app1 app1.docker_internal
which has apparently been written by nerdctl and ought to work.sknowlton
02/23/2022, 5:40 PMresolver
line in our local nginx config when we run nginx in docker for developmentsknowlton
02/23/2022, 5:40 PMsknowlton
02/23/2022, 5:41 PMserver {
################### SERVER NAME AND PORT #####################
server_name <http://inleague.localtest.me|inleague.localtest.me> <http://testinleague.localtest.me|testinleague.localtest.me> *.<http://ngrok.io|ngrok.io>;
listen 80;
listen 443 ssl http2;
index index.cfm index.cfml index.htm index.html;
resolver 127.0.0.11 valid=30s; # docker DNS daemon
set $cfml_host inleague-cfml; # this causes nginx to be OK if the host isn't up
(then the cfml proxy stuff)cfsimplicity
02/23/2022, 5:44 PMsknowlton
02/23/2022, 5:49 PMsknowlton
02/23/2022, 5:49 PMcfsimplicity
02/23/2022, 5:52 PMcfsimplicity
02/23/2022, 6:13 PMcfsimplicity
02/28/2022, 5:08 PMproxy_pass
directive won't use the hosts file for some reason, so you need a resolver which has the record, which in dockerd is always 127.0.0.11, but which isn't available in Rancher/containerd. Found a workaround which is to set up the proxied hostname using an upstream
definition, which does access the hosts file.