

Apply the Run/Debug Configuration and close the dialog.Īt this step it's important to note that that there are many ways to create/configure Docker containers and VM images, and we'd recommend to always refer to the Docker documentation on the official web site.įor the purposes of this tutorial we're using Dockerfile and Apache configuration file.In addition, we can configure links, volume bindings, environment variables, and much more. At this point we are interested in exposing port 80 of the container to be available from our local machine, so we should configure a port binding for that ( Container port: 80, Protocol: tcp, Host IP: empty, Host port: 8080): Provide all the necessary parameters and configurations on the Container tab. In our case we've provided Run/Debug Configuration Name ( Start Docker in our case), selected the server ( Docker), selected the Deployment method to be Dockerfile, provided Image tag ( mysite) and Container name ( Docker_Xdebug): Provide all the necessary parameters on the Deployment tab. Then, create a Docker Deployment configuration with a + button: Create a new Docker Deployment Run/Debug Configuration invoking the dialog from the Run | Edit configurations.Apply the configuration and close the Settings / Preferences dialog.
#Phpstorm xdebug docker for mac os x#
You should provide the configuration name ( Docker in our case), API URL ( tcp://localhost:2375 for Windows and for Mac OS X if using PhpStorm older than 2017.1, unix:///var/run/docker.sock for Mac OS X and Linux).

read tutorials on installing Docker on Amazon EC2, Google Cloud Platform, and Microsoft Azure).
#Phpstorm xdebug docker install#

Prerequisites for Mac for PhpStorm 2016.3 and below.PhpStorm & Docker Integration Configuration.
