host.docker.internal
is only available in Docker Desktop. Using Docker Engine (Docker CE) you can
-
Use the host IP and protect the proxy with firewall rules against external requests.
-
Allow the proxy to listen on any private IP on the host which is available from containers
-
Use socat to implement a similar solution to the
host.docker.internal
domain in Docker Desktop:Host.docker.internal in production environment - #4 by rimelek