devdns is a DNS server that replies 127.0.0.1 (or configured ip) always. ftw: *.dev on localhost.
511
this repo is a fork of robbiev/devdns, wrapped into a docker images
One-liner:
eval "$(docker run --rm lalyos/devdns --eval)"
if you want to see what are the steps run this:
docker run --rm lalyos/devdns --eval
/etc/resolver/dev file see details0.0.0.0:5300ping whatever.devOn linux /etc/resolv.conf is used to configre DNS servers. Unfortunately you can't specify an alternative port number, so you have to expose to port 53.
Start the container:
docker run \
-d \
--name devdns \
-p 53:53/udp lalyos/devdns \
-addr 0.0.0.0:53
add a new line to your /etc/resolv.conf
nameserver 127.0.0.1
To see all options
docker run --rm lalyos/devdns --help
Kill the container:
docker rm -f devdns
For osx remove /etc/resolver :
sudo rm -rf /etc/resolver/
For linux remove the line from /etc/resolv.conf
nameserver 127.0.0.1
docker pull lalyos/devdns:latest