
Based on that configuration The server tries to connect with Your local computer on the given IP and port number.


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).
