DEV Community

Cover image for Mastering the Docker networking

Mastering the Docker networking

Leandro Proença on July 05, 2022

Few months ago I demonstrated through a practical example the reasons to understand and take advantage of Docker volumes. In this one, I'll try t...
Collapse
 
willb profile image
willb

Great article!
I've got a question - especially as networking is not a strength of mine.
Trying to figure out the difference between the bridge network and the saturno network. Why does the saturno network allow you to use the container name, where the bridge network doesn't.
I inspected both, and it seems the only difference are the options. Which one of the options for the bridge network, disallows the use of the container name?

Collapse
 
leandronsp profile image
Leandro Proença

I'm not aware of the internals but I guess that the default bridge network does not add containers to the /etc/hosts

Collapse
 
willb profile image
willb

Thanks!

Collapse
 
benbb96 profile image
BBB

I was wondering the same thing

Collapse
 
jleonardolemos profile image
Leonardo Lemos

Nice post thanks!!!! What about overlay networks, they are very hard to understand and a post like that would be very nice??

Collapse
 
leandronsp profile image
Leandro Proença

Indeed, thanks for the feedback, I'll try to write about overlay networks!

Collapse
 
sabberworm profile image
Raphael Schweikert

Thanks for the writeup. What I don’t understand is how containers connect to the internet. From what I know, it would involve some sort of NAT, at least for IPv4. On that tangent, I would love to know how to use IPv6 (for internet connectivity) on a container without automatically exposing IPv6-bound ports to the outside (and without having to configure complicated firewall rules). It’s kinda weird that docker doesn’t treat IPv4 and IPv6 the same in this regard.

Collapse
 
hdjumscom profile image
HDJumsCom

great post. thanks man

Collapse
 
hamzaely profile image
Hamza EL YAAQOUBI

Thank you !