Last active
May 12, 2017 12:21
Debuging console php application from docker container
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
#!/bin/sh | |
SERVER_NAME=localhost \ | |
SERVER_PORT=80 \ | |
XDEBUG_CONFIG="PHPSTORM" \ | |
php -dxdebug.remote_host=`ip r | grep default | awk '/default/{print $3}'` \ | |
$@ | |
#Usage in the docker: | |
#c_xdebug.sh script.php | |
# | |
#Usage from the host: | |
#docker exec -it your_php_container bash -c 'cd to_src_dir; c_xdebug.sh script.php' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment