Last active
March 17, 2022 21:26
-
-
Save alexbenfica/658d9ed2333b2db8aa759017848ee435 to your computer and use it in GitHub Desktop.
Dockerfile for WordPress development with PHP xDebug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM wordpress:4.9.6-php7.2-apache | |
RUN apt-get update \ | |
&& apt-get upgrade -y \ | |
&& apt-get install -y \ | |
nano \ | |
gnupg1 \ | |
gnupg2 \ | |
nodejs \ | |
ca-certificates \ | |
git \ | |
webp | |
RUN pecl install xdebug | |
RUN docker-php-ext-enable xdebug | |
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' \ | |
>> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.remote_handler=dbgp' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.idekey=docker' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.remote_host=192.168.1.110' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.profiler_output_dir="cachegrind.out.%p"' >> /usr/local/etc/php/php.ini | |
RUN echo 'xdebug.profiler_enable=1' >> /usr/local/etc/php/php.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment