Skip to content

Instantly share code, notes, and snippets.

@hmajid2301
Created March 24, 2020 13:12
Show Gist options
  • Save hmajid2301/9a8bde2924c9ff52f37b6150c5977672 to your computer and use it in GitHub Desktop.
Save hmajid2301/9a8bde2924c9ff52f37b6150c5977672 to your computer and use it in GitHub Desktop.
How can we setup a DNS resolver using docker; We can send DNS requests like so `dig -p 5053 @172.28.1.1`
version: "3"
services:
bind:
image: sameersbn/bind:latest
dns: 127.0.0.1
expose:
- 53/udp
- 53/tcp
ports:
- 10000:10000
- 5053:53/udp
- 5053:53/tcp
networks:
dnsnet:
ipv4_address: 172.28.1.10
networks:
dnsnet:
ipam:
driver: default
config:
- subnet: "172.28.1.0/24"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment