

\ '/app/web/': '/Users/jmarceli/Work/wordpress/my_site/web/' etc/php/development.ini (path relative to the docker-compose.yml location). But for the container which I am using it is located inside.

Normally you would define the configuration inside php.ini file (e.g. Depending on user action, debugger sends back some instructions to the Xdebug on the same port on which Xdebug connects with the debugger.
#Docker for mac port conflicts on loopback code

You run PHP script or make a request to a website.Your local computer starts listening on 9000 port (by default).You start DBGP session in your debugger (Vim or some IDE like PHPStorm).While not beeing a Xdebug nor DBGP protocol expert I see this architecture/communication as follows: So there is no need to publish it, your computer will never try to connect to the Xdebug via 9000 port. Docker run -p 9000:9000 your_xdebug_server_imageīecause Xdebug (which is running on your container/server) doesn't listen on that port, it just sends some data to that port (to your computer on which you are working).
