podman build -t container-dnsmasq .
podman run -it -p 53:53/tcp -p 53:53/udp -v $( pwd )/hosts_dir/:/hosts_dir/:z container-dnsmasq
Host files are contained in hosts_dir and all records are read by dnsmasq by using --hostsdir option as seen in Containerfile.
--hostsdir=<path>
Read all the hosts files contained in the directory. New or changed files are read automatically.
$ dig +short my-cool-host.example.com @<server-name>
10.x.x.x