cytopia / docker-bind

Bind (bind9) caching DNS server on Alpine or Debian with wild-card domain support [multi-arch]
http://devilbox.org/
MIT License
91 stars 50 forks source link

[Question]: How do i use host.docker.internal while this service is active #63

Closed b-strauss closed 1 year ago

b-strauss commented 1 year ago

Have you already checked elsewhere?

What is your question?

I need to use xdebug to debug something in php. Normally you can use the special DNS name 'host.docker.internal' from docker to connect xdebug to the host system. But when cytopia/bind is active xdebug can't establish a connection. If I disable cytopia/bind, it's working. Is there something I need to configure to make this work while cytopia/bind is active?

What have you tried already?

Different environment configurations.

What is your goal?

Make xdebug work.

vikas5914 commented 1 year ago

@b-strauss Have you tried this : https://devilbox.readthedocs.io/en/latest/intermediate/configure-php-xdebug.html

b-strauss commented 1 year ago

I was able to solve it by setting this on the php container service.

  extra_hosts:
    - host.docker.internal:host-gateway