Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

igorwwwwwwwwwwwwwwwwwwww/docker-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-dns

.docker dns resolver.

resolves $container.docker to its respective ip. supports container ids as well as names. plays nicely with docker-machine on osx.

install

% sudo route -n add 172.17.0.0/16 $(docker-machine ip default)

% ./install-resolver.sh 127.0.0.1 5300
% gvt restore

run

% eval $(docker-machine env)
% go run docker_dns.go
# in separate window
% docker run -d --name nginx nginx
% curl nginx.docker

debug

% dns-sd -G v4 nginx.docker

container

% docker build -t docker-dns .

% ./install-resolver.sh $(docker-machine ip) 5300
% docker run -v /var/run/docker.sock:/var/run/docker.sock -p 5300:5300/udp -it docker-dns

After building this I found dnsdock.

% sudo route -n add 172.17.0.0/16 $(docker-machine ip default)

% ./install-resolver.sh $(docker-machine ip)
% docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p 53:53/udp tonistiigi/dnsdock
% ping dnsdock.docker

Much better.

About

.docker dns resolver.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published