Fill these in once
- From inside the container, use host.docker.internal instead of localhost
curl http://host.docker.internal:3000Docker Desktop sets this name up for you.
- Start the container with the host name added
docker run --add-host=host.docker.internal:host-gateway -it alpine shIn docker-compose.yml, add extra_hosts with host.docker.internal:host-gateway instead.
- From inside the container, use host.docker.internal
curl http://host.docker.internal:3000Your app on the host must listen on all addresses (0.0.0.0), not just 127.0.0.1.
- From inside the container, use host.docker.internal instead of localhost
curl http://host.docker.internal:3000Docker Desktop sets this name up for you.