A power outage recently made a mess of my home lab due to a resulting issue with VSAN. As a result, I needed to setup a fresh Virtual Center Server Appliance (VCSA), but my DNS server was on the VSAN! vCenter now requires working DNS resolution during install... What to do??
Well, I've recently been getting started with Docker so figured this would be a good opportunity to use that to address an immediate need that I, and potentially others, would need: A quick and easy lightweight DNS server that could be used for resolving my lab domain. 

Prior to my lab going down, DNS was running on my Windows Domain Controller at 192.168.1.10. With limited resources and templates available, setting up a Windows DNS server would take a bit of time: Clone and Customize, Updates, DNS role install, Forward Lookup Zone setup, entries, etc... this could easily be a few hours of work.

How about Linux? Well, I know Bind is a powerful and popular solution, but I wanted to look for something smaller and simple to get up and running in the future within a couple minutes.

Enter Docker - I was fortunate enough to attend #DockerCon18 this year and recalled hearing something about Kubernetes replacing kubedns with CoreDNS so I decided to look into that and see if it would be something I could use.

After a bit of testing, I was able to consistently run a container that would resolve entries for my home lab domain - and - would resolve any updates to the host names that needed to be resolved.


End result:
  • 32.9MB Container
  • Simple text file formats for host definitions: DNS Zone format OR Hosts file format
  • docker run command line
  • Simple docker-compose line to get the container up and running 
So, now in the future if I need to spin up a DNS server I can do it in under 5 minutes! Or if you need a quick DNS server that doesn't eat a ton of resources, all we have to do is:
  1. Clone my repo from GitHub
  2. Modify two text files to resolve for the desired lab/test domain name
  3. Run the container
Here's the Github info: my Docker-CoreDNS repo