docker.for.mac.host.internal
, docker.for.mac.localhost
, docker.for.mac.gateway.internal
are deprecated, you must now use host.docker.internal
, vm.docker.internal
, and gateway.docker.internal
on the host:
nc -l 0.0.0.0 8899
$ docker run -it --rm alpine
# apk --no-cache add curl
# curl -X GET host.docker.internal:8899