version: '2'
services:
dns-gen:
container_name: dns-gen
image: jderusse/dns-gen
ports:
- "127.0.0.1:54:53/udp"
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
apt install dnsmasq
Add custom config to /etc/dnsmasq.d/my-dns-gen.conf
server=/.docker/127.0.0.1#54
That's all. Containers will resolve by CONTAINER_NAME.docker
. Also you can specify DOMAIN_NAME
env.
Dns-gen container: https://github.com/jderusse/docker-dns-gen