Skip to content

Instantly share code, notes, and snippets.

@EugenMayer

EugenMayer/docs

Created Jul 28, 2016
Embed
What would you like to do?
/Library/LaunchDaemons/de.kontextwork.docker.loopback.plist
- name the file as you please, does not matter
- ensure the file is owned by root:wheel or it will not be used
It will create a loopback device 10.254.254.254 which can be used a remote_host in containers like xdebug configuration
- configure xdebug the way shown below.
Why all this?
- docker for mac will not allow to use connect_back
- you would need to use the user-specific ip of the current users interface ( eth/wlan ) in remote_host .. this way either your bootstrap becomes utterly complex or the dev images are not portable from developer to developer
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>de.kontextwork.docker.loopback</string>
<key>ProgramArguments</key>
<array>
<string>ifconfig</string>
<string>lo0</string>
<string>alias</string>
<string>10.254.254.254</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
zend_extension=xdebug.so
xdebug.remote_autostart=0
xdebug.remote_enable=1
; this is our local loopback device we created, see /Library/LaunchDaemons/de.kontextwork.docker.loopback.plist
xdebug.remote_host="10.254.254.254"
xdebug.idekey="netbeans-xdebug"
xdebug.remote_connect_back=0
xdebug.remote_log="/tmp/xdebug.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.