I see that you put xdebug config direct in dockerfile it's bad approach. You can create a file called xdebug.ini it can look like the following:
[Xdebug] xdebug.remote_autostart=0 xdebug.remote_enable=1 xdebug.default_enable=0 xdebug.remote_host=host.docker.internal xdebug.remote_port=9000 xdebug.remote_connect_back=0 xdebug.profiler_enable=0 xdebug.remote_log="/tmp/xdebug.log" xdebug.profiler_output_dir="/var/www/html/profiler" xdebug.profiler_output_name="cachegrind.out.%p" xdebug.cli_color=1 xdebug.profiler_append=1
after that copy that one into /usr/local/etc/php/conf.d/
This is a lot cleaner, also since we use prebuilt docker images we cant just change the dockerfile. I've not been able to get it to work the way you explained, but i'll try again later ;)
Thank you for reply, it's prettier solution as you said.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I see that you put xdebug config direct in dockerfile it's bad approach. You can create a file
called xdebug.ini it can look like the following:
[Xdebug]
xdebug.remote_autostart=0
xdebug.remote_enable=1
xdebug.default_enable=0
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9000
xdebug.remote_connect_back=0
xdebug.profiler_enable=0
xdebug.remote_log="/tmp/xdebug.log"
xdebug.profiler_output_dir="/var/www/html/profiler"
xdebug.profiler_output_name="cachegrind.out.%p"
xdebug.cli_color=1
xdebug.profiler_append=1
after that copy that one into /usr/local/etc/php/conf.d/
This is a lot cleaner, also since we use prebuilt docker images we cant just change the dockerfile. I've not been able to get it to work the way you explained, but i'll try again later ;)
Thank you for reply, it's prettier solution as you said.