Forward dns request to another dns server

How can I forward configure my local dnsmasq so requests with hostnames ending with .docker are forwarded to another nameserver, while other requests are still handled locally ?

I have looked for an /etc/dnsmasq.conf file on my system but could not find it (only a dnsmasq.d directory).

EDIT : apparently, dnsmasq is run by network manager, like this :

/usr/sbin/dnsmasq --no-resolv --keep-in-foreground
--no-hosts --bind-interfaces
--pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid
--listen-address=127.0.1.1
--conf-file=/var/run/NetworkManager/dnsmasq.conf
--cache-size=0 --proxy-dnssec
--enable-dbus=org.freedesktop.NetworkManager.dnsmasq
--conf-dir=/etc/NetworkManager/dnsmasq.d

In dnsmasq.conf

server=/docker/10.1.1.1

This would forward all requests looking for TLD .docker to 10.1.1.1. Not sure why your dnsmasq.conf is missing. What distribution are you using?