Expected behavior
I would like to be able to have docker.local resolve to the docker host IP from inside a container. My use case is debugging a PHP app that is running inside the container using a debugger that runs in the host. The way PHP debugging works is the PHP application runs as a client that sends data to the debugger, which is the server in this scenario.
Previously, with Docker Toolbox, I used to pull the host IP and send it into the container via “extra_hosts” section of docker-compose.yml (a script would do dynamic substitution). I would love to drop this entirely.
Actual behavior
Inside the container, docker.local does not resolve.
Information
Pinata output:
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160427-134845.tar.gz
Most specific failure is: No error was detected
Your unique id is: 8E44C429-D414-441A-8E16-5CD83CE0681A
Steps to reproduce the behavior
- Start containers via docker-compose
- Exec bash on container (docker exec -ti bash)
- ping docker.local