Created
June 10, 2020 05:56
-
-
Save Arbagen/39d0006ed7e46648fe0c14c30681a322 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ARG INSTALL_XDEBUG=true //instal? | |
ARG XDEBUG_REMOTE_HOST=dockerhost // linux 172.17.0.1 | |
ARG XDEBUG_VERSION=2.7.2 //version for php | |
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ | |
pecl install xdebug-${XDEBUG_VERSION} && docker-php-ext-enable xdebug \ | |
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_connect_back=0" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.max_nesting_level=500" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
&& echo "xdebug.remote_host=${XDEBUG_REMOTE_HOST}" >> /usr/local/etc/php/conf.d/xdebug.ini \ | |
;fi | |
-------------------------------------------------------------------------------------------------------- | |
for phpstorm | |
PHP_IDE_CONFIG=serverName=docker | |
settings > php servers > add new: host - docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment