This is a simple way to get a dns server up and running using docker compose and Coredns. Feel free to fork this to your hearts desire, i'm putting this up as an example for my future self and other folks wanting to use core dns on docker. Right now it just forwards dns entries to google dns servers
You can add a new block to the corefile for a specfic domain and then add to the hosts file to specficy dns entries, this is an easy way to specify domain names for things in your local network. More details here. You can get way more complicated by making use of the various plugins coredns offers. Want to learn more about coredns overall, go here
Once you have configured this how you like, clone this repo to the machine you want to run it on, make sure that machine has docker installed then run docker-compose up -d
and you should be good to go.