Access container by it's container name / service name

$ docker run -rm nginx --name my-nginx
$ nslookup my-nginx.docker
Server:		172.17.0.3
Address:	172.17.0.3#53

Non-authoritative answer:
Name:	my-nginx.docker
Address: 10.0.2.3

You can enable this feature by

Activating by command line

./dns-proxy-server -register-container-names

Configuring at json config file

...
"registerContainerNames": true
...

Using environment variable

MG_REGISTER_CONTAINER_NAMES=1 ./dns-proxy-server

You can also customize the domain from docker to whatever you want by

Activating by command line

./dns-proxy-server --domain docker

Configuring at json config file

...
"domain": "docker"
...

Using environment variable

MG_DOMAIN=docker ./dns-proxy-server