Skip to content

Commit

Permalink
better xdebug connection for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Schnitzel committed Jan 10, 2018
1 parent 0216c16 commit e336783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/php/fpm/entrypoints/60-php-xdebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ get_dockerhost() {
return
fi

# Fallback to localhost
echo "localhost"
# Fallback to default gateway (should work on Linux) see https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
echo $(route -n | awk '/UG[ \t]/{print $2}')
return
}

Expand Down

0 comments on commit e336783

Please sign in to comment.