Docker Community Forums

Share and learn in the Docker community.

Unable resolve server name in one container, but works in another container

Hi, docker community,

I have 2 docker containers (A and B) running on a same server.

They use the same image , but runs in 2 different subnet. A runs in, B runs in

Since A and B uses the same image, the settings within the containers are the same.

But A can resolve a server name to ip address correctly, but B can’t.

For example, running “ping” inside both containers:

translate to ip : immediately.

hangs , and then report “Name or service not known”.

Both A and B has the same /etc/resolve.conf file, and both can ping “”.

Does anyone have any suggestion to investigate further?