Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDebug broken on linux after chage to host.docker.internal #197

Closed
Holo96 opened this issue May 28, 2024 · 1 comment
Closed

XDebug broken on linux after chage to host.docker.internal #197

Holo96 opened this issue May 28, 2024 · 1 comment

Comments

@Holo96
Copy link

Holo96 commented May 28, 2024

Issue broke linux.

Tested on Docker Engine 26.1.3

host.docker.internal does not work automatically on Linux. You need to add --add-host=host.docker.internal:host-gateway manually. As mentioned here.

Proposed solutions:

  1. Revert back to 172.17.0.1
  2. Add extra_hosts to php container: as mentioned here
services:
  php:
    extra_hosts:
      - "host.docker.internal:host-gateway"
  1. Override php env variable for linux: PHP_XDEBUG_CLIENT_HOST
services:
  php:
    environment:
       PHP_XDEBUG_CLIENT_HOST: 172.17.0.1

Edit:
I am using docker4drupal stack, and it does not work out of box.

csandanov added a commit to wodby/docker4drupal that referenced this issue Jun 29, 2024
@csandanov
Copy link
Member

Thank you, decided to go with extra hosts solution

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

No branches or pull requests

2 participants