Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.36 KB

host-address-alias-an-mac.rst

File metadata and controls

51 lines (32 loc) · 1.36 KB
orphan

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

local

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

* configure_php_xdebug * *