Question around Docker Networking from a Quiz from a Udemy Course

Hi all,

I am doing a Udemy course and learning about Docker networking, now in the quiz there was a question asking what network would you use if you wanted containers to talk to each other on the same host.

The answer was Bridge, but I have questions around this and hope someone can shed some light on this.

I would of thought the answer would of been to create a new network that then allows DNS as the bridge network does not have DNS by default and if you wanted containers to ping each other etc you would need to via a link if you use the bridge network. Anything else like communicating directly via IP’s is an anti-pattern

So am I right in the answer should of been create a new network to be able to communicate via DNS?

Thanks!

Hard to tell without knowing all the possible answers.
Are you sure it said what network, and not what network driver?

You might get in touch with the instructor/trainer of the course and let them know about your concern.

Oh you were correct, it was network driver. I knew I was missing something. Maybe doing quiz’s at midnight is not the smartest of options haha!

Thanks for the reply though which made me triple check