Docker php container how ping to host

There is a way to send a curl or a ping from inside php container to host ip environment?

I have to get back from xdebug to netbeans but unless use --net=host option in docker run I can’t perform it.

I know that containers have to be isolated, but how can within it, for example, get the 8080 port on my host?