In this blog we gone see how two containers can communicate with each other using the concept of Docker Networking. One of the most important thing that docker containers and services are so powerful is that you can connect them together.

Let’s imagine you have two application one is front-end application and second one id back-end and you created two containers one for each.

By using these containers you run the application , But the application run individually , now you need to connect the back-end application to front-end. The solution for this is “Docker Networking”.

There are different types of Network Driver

Bridge Network Driver
Overlay Network Driver
Host Network Driver
Macvlan Network Driver
In this blog we’ll focus on the default network driver “Bridge Network Driver”

Bridge Network Driver
A Bridge network can be a link layer betwwen two differant containers. As the name given a bgridge can be hardware and software also. In docker bridge netwoek driver is a software which connect the containers.

Bridge network driver is the default network driver provided by docker.

Bridge network driver does not allow to connect the container which is present on the different host machines. It means that the different containers are able to ping each other.

You can create your own bridge network called “User-Defined Bridge Network”. A user-defined bridge network is superior to the default bridge network. One of the reasons is that whenever you use the default bridge network the containers can communicate using the IP address of other containers and not support the DNS name. Whereas the in bridge network container can communicate using both.

#devops #docker #networking #sre

Docker Networking(Bridge-Network)
1.30 GEEK