Skip to content

Instantly share code, notes, and snippets.

@edyonil
Created April 13, 2017 15:46
Show Gist options
  • Save edyonil/3757a34c86d23a3a4118f524f07457bd to your computer and use it in GitHub Desktop.
Save edyonil/3757a34c86d23a3a4118f524f07457bd to your computer and use it in GitHub Desktop.
FROM php:7-fpm
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y \
&& pecl install xdebug \
&& rm -rf /tmp/pear \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_port=9001\n" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_host="/sbin/ip route|awk '/default/ { print $3 }' >> /usr/local/etc/php/conf.d/xdebug.ini
USER www-data
WORKDIR /var/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment