Skip to content

Conversation

@erild
Copy link

@erild erild commented Mar 18, 2018

Add xdebug remote host through internal network to php config
Add remote_host DNS to host file

echo "XDebug disabled";
fi

if [ $REMOTE_HOST_ENABLE == "true" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why configuring this variable if xdebug is disabled ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in case you need the DNS for the host for something else (no more need for the external_host with the ip of the host, you can use the docker internal network)

&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_host=XDEBUG_REMOTE_HOST" >> /usr/local/etc/php/conf.d/xdebug.ini \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's a specific configuration it's better to add a specific file like

ADD config/custom-php.ini /usr/local/etc/php/conf.d/custom-php.ini

@nassimkirouane nassimkirouane self-requested a review March 19, 2018 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants