ops icon indicating copy to clipboard operation
ops copied to clipboard

Update docker-compose files to include extra_hosts

Open mcdoogs opened this issue 2 years ago • 0 comments

This pull request fixes xdebug when using Docker for Linux, by manually adding the 'host.docker.internal' DNS name. Ops' xdebug config refers to the debugging client's host using the name 'host.docker.internal', which only exists by default on Docker Desktop; so xdebug can't connect to the host machine on Docker for Linux. This PR updates the docker-compose files for the apache backends to manually add that 'host.docker.internal' to the hosts file using Docker's magic host-gateway reference. This is the official approach and shouldn't affect Docker Desktop - see this issue. I've tested and this correctly updates the containers' hosts file, and xdebug is working now.

mcdoogs avatar Mar 29 '23 01:03 mcdoogs