Is it possible to query DNS from the Docker local machine to the docker dns server?

I am using a container that uses a local network.
I would like to access the container from another container using an alias.
I can not get dns information even if registering in resolv.conf.
What should I do?

when u do docker run, use the parm --add-host name:ipaddress

this updates the container /etc/hosts file you cannot edit is manually