Skip to content

XDebug configuration can be incorrect #268

@Learath2

Description

@Learath2

Running Docker rootless or using Podman xdebug.client_host will end up being wrong.

A workaround for it in Docker is to set it to host.docker.internal and in Podman to host.containers.internal. To unify both one could add the extra_host host.docker.internal:host-gateway to the docker-compose file. However the setting host-gateway is very very new so it'll only work on very recent Docker versions. This would also only work if the containers are built on the same machine they are being composed on (which is usually the case tbf).

The proper way to handle this would be to define a network inside the compose file so the ip of the gateway is always predictable. I may or may not mess around with doing that later. Just wanted to document the workaround for now just in case anyone else has trouble with XDebug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions