Important Announcement

Everybody is strongly encouraged to switch to the upcoming v1.0.0 release version to prevent unforseen issues upon merge to master.

Instructions here: https://github.com/cytopia/devilbox/pull/416.

Host address alias on MacOS

In order for Xdebug to work on Docker for MacOS, the container needs a well known IP address for its Xdebug remote host. This is achieved by adding an alias to the loopback device.

Table of Contents

One-time alias

In order to create this alias for testing purposes, which does not survive reboots, you can issue the command manually with sudo or root privileges.

host> sudo ifconfig lo0 alias 10.254.254.254

Boot persistent alias

If you want to have this alias persistent across reboot, you need to download and enable a plist file:

# Download the plist into the correct location
host> sudo curl -o \
        /Library/LaunchDaemons/org.devilbox.docker_10254_alias.plist \
        https://raw.githubusercontent.com/devilbox/xdebug/master/osx/org.devilbox.docker_10254_alias.plist

# Enable without reboot
host> sudo launchctl load /Library/LaunchDaemons/org.devilbox.docker_10254_alias.plist