21 Days of Docker-Day 11- Docker Networking – Part 3

None Network Driver

  • If we want to completely disable the networking stack on a container, we can use the none network.
  • By using this mode, it will not configure any IP for the container and have no access to the external network as well as for other containers.
  • Let’s try to create a new container using none driver
$ docker container run -dt --name mynonenetwork1 --network none busybox sh
24756038f07aa1eff43047a7ef17c71957911d4f351e17ae4a7341b52db7f5be
  • Try to login to the container
$ docker container exec -it 24756038f07aa1eff43047a7ef17c71957911d4f351e17ae4a7341b52db7f5be sh
  • If we try to check the network interface, you will see no IP assigned to the container
# ifconfig
lo Link encap:Local Loopback
 inet addr:127.0.0.1 Mask:255.0.0.0
 UP LOOPBACK RUNNING MTU:65536 Metric:1
 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 

Overlay Network Driver

  • One of the limitations of Bridge Networking is the containers on different bridge network cannot communicate with each other
  • The overlay driver enables simple and secure multi-host networking.
  • All containers on the overlay network can communicate with each other.
  • Overlay networks manage communications among the Docker daemons participating in the swarm. You can create overlay networks, in the same way as user-defined networks for standalone containers. You can attach a service to one or more existing overlay networks as well, to enable service-to-service communication. Overlay networks are Docker networks that use the overlay network driver.
  • I am going to give more information overlay network when I discuss Swarm.

I think this is a good place to stop for Day11.

Please follow me with my Journey

This time to make learning more interactive, I am adding

  • Slack
  • Meetup

Please feel free to join this group.

Slack: 

https://100daysofdevops.slack.com/join/shared_invite/enQtNzg1MjUzMzQzMzgxLWM4Yjk0ZWJiMjY4ZWE3ODBjZjgyYTllZmUxNzFkNTgxZjQ4NDlmZjkzODAwNDczOTYwOTM2MzlhZDNkM2FkMDA

Meetup Group

If you are in the bay area, please join this meetup group https://www.meetup.com/100daysofdevops/