You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_hosthost.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.
The text was updated successfully, but these errors were encountered:
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 tohost.containers.internal
. To unify both one could add theextra_host
host.docker.internal:host-gateway
to the docker-compose file. However the settinghost-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.
The text was updated successfully, but these errors were encountered: