Accessing sites on the docker host not working (network is unreachable) #204
DennisGaida
started this conversation in
Support
Replies: 1 comment
-
My solution for inside docker containers now is the following - for the host it is just editing extra_hosts:
- "<name>.$DOMAINNAME0:host-gateway" At least If you want to get even fancier use aliases and anchors: x-extra_hosts:
&default-extra_hosts
- "<name>.$DOMAINNAME0:host-gateway"
services:
app:
extra_hosts: *default-extra_hosts |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Clearly a networking issue, but I'm pulling my hair out trying to solve it:
Following setup. Pihole's IP is
192.168.1.5
. My docker host is at192.168.1.10
. Pihole resolves all DNS. Checking my resolv.conf on the docker host:ping xyz.example.local
returns IP192.168.1.10
-nslookup xyz.example.local
also returns IP192.168.1.10
. Cool.But when I try
curl -k https://xyz.example.local
I getnetwork is unreachable
. When I do the same from any remote machine it just works™ (i.e. I see the page being served under xyz.example.local).Here comes the kicker - when I manually edit the
hosts
file and map that domain to 127.0.0.1 it also works locally:My host apparently doesn't like when being called upon with the external IP from localhost? What am I missing / doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions