Docker not shares the hosts nameservers and nameresolves(which exists on /etc/resolve.conf in host). To specify the…