Chris DeBracy
11/20/2023, 12:36 AMNate
11/20/2023, 12:42 AMMarvin
11/20/2023, 12:43 AMNate
11/20/2023, 12:43 AMMarvin
11/20/2023, 12:43 AMhost.docker.internal
DNS address. Here are a few things you could try:
1. You can use host.docker.internal
which gives the localhost of the macOS. The host has a changing IP address (or none if you have no network access). It's recommended that you connect to the special DNS name host.docker.internal
which resolves to the internal IP address used by the host. [^1^]
2. There could be several reasons why DNS is broken within docker containers. One possibility is if dnsmasq is used. To check whether this is the case, run ps -e | grep dnsmasq
on the host. If the output is empty, you're not running dnsmasq. [^2^]
3. You should be using the Docker embedded DNS server at 127.0.0.11
. Your problem could be caused by one of several factors. [^3^]
Please check these resources for more detailed solutions. If you're still having trouble, let me know and I'll do my best to assist you further.
[^1^]: Stack Overflow - Cannot access docker host from macos
[^2^]: Stack Overflow - DNS not working within docker containers when host uses dnsmasq and ...
[^3^]: Stack Overflow - Docker Network Nginx Resolver