This gist contains hints/tips to get you started using Docker with PHP7 and xdebug including a local DNS solution (docker-spy).
Look at the Dockerfile, the docker.sh script just builds/runs to suit my specs, hope it helps you out!
I did this on a Mint 17/Ubuntu 14.04 machine using Docker version 1.7.0, build 0baf609.
Your mileage may vary on this step, read this first:
http://www.ivoverberk.nl/service-discovery-with-docker/
I had to add this line (Mint 17/Ubuntu 14.04):
nameserver 127.0.0.1
You can also edit /etc/default/docker (...or it could be /etc/docker/docker.io depending how you installed docker) to add ---dns options to suit your environment.
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
http://docs.docker.com/engine/articles/configuring/#configuring-docker
Mint 17/Ubuntu 14.04 complicates things because it uses dnsmasq, just something to keep in mind.
docker pull iverberk/docker-spy
# create the docker-spy container, I needed the localhost "127.0.0.1" IP due to Mint17s use of dnsmasq, complicates things.
docker run --name docker_spy -p 127.0.0.1:53:53/udp -p 127.0.0.1:53:53 -v /var/run/docker.sock:/var/run/docker.sock iverberk/docker-spy
# Note: need to use 'docker run' like this when starting containers to use docker-spy:
# docker run --dns=172.17.42.1 -h agent1.localdomain --rm -it centos:centos6 bash
# docker run --dns=172.17.42.1 -h agent2.localdomain --rm -it centos:centos6 bash
# -h, --hostname=""
# --dns=[] Set custom DNS servers
###3) modify/run docker.sh
Charles Hilditch [email protected]
http://www.magemechanic.com/