Skip to content

Instantly share code, notes, and snippets.

@andybeak
Created September 4, 2020 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andybeak/77842723cccb4603f811d9a1e64e108e to your computer and use it in GitHub Desktop.
Save andybeak/77842723cccb4603f811d9a1e64e108e to your computer and use it in GitHub Desktop.
Include xdebug in Dockerfile
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_host = host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.
@andybeak
Copy link
Author

If you're running PHP 5.6 and are unable to upgrade then pecl install xdebug-2.5.5 will let you keep to your wayward ways and avoid upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment