Last active
August 29, 2015 14:14
-
-
Save bonndan/49f115b05145bf242036 to your computer and use it in GitHub Desktop.
docker-local-dns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# see https://github.com/iverberk/docker-spy | |
# | |
boot2docker up | |
BOOT2DOCKER_IP="$(boot2docker ip)" | |
DOCKER_IP_BRIDGE="172.17.42.1" | |
DNS_DOMAIN="local-dev.leanix.net" | |
mkdir -p /etc/resolver | |
touch /etc/resolver/local-dev.leanix.net | |
echo "nameserver ${DOCKER_IP_BRIDGE}" > /etc/resolver/local-dev.leanix.net | |
route -n add -net 172.17.0.0 ${BOOT2DOCKER_IP} | |
docker run --name docker_spy -p 53:53/udp -p 53:53 -v /var/run/docker.sock:/var/run/docker.sock iverberk/docker-spy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment