Host.docker.internal not resolving correctly

As of v 4.23, our usage of ${DOCKER_HOST_GATEWAY:host.docker.internal} is broken. We are using this in a docker-compose file in order to whitelist the host machine with one of the containers (dgraph, if it matters.)

You can tell from the container’s logs, that is being provided as the IP address of host.docker.internal. But when the host machine is actually trying to access the container, it is being reported as

This happens on 4.23 and 4.24. If I rollback to 4.22, everything works as it has for the past 9 months or so.

Has something changed? I see in the 4.23 release notes that the mac networking was reworked, did something break or is something else required now?

This forum is not an official product support or issue reporting channel.

1 Like

This is still happening as of 4.25.0 (also checked on 4.24.2…) Can anyone else confirm for me that they are not seeing this behavior? I can’t find any mention of needing to change anything from 4.23 onward but the release notes claiming the that the mac networking was reworked makes me suspicious.

To restate… host.docker.internal is getting resolved as at container startup (which is being used for a whitelist) but when I use the localhost to access a container at runtime, it is coming through and is therefore getting blocked.

Rolling back to 4.22 completely resolves the problem.