Actually, containers need to use bridge which generally has a different IP address . These containers go through these bridge and then passes the firewall to the port.
when we create a container, we publish the container using -p
SO, if you check your devices IP address & this containers IP address, you will see that they are not same. Because the container is passing through a bridge which has its own IP address.
SO, this is the IP address of the bridge . The bridge is a medium through your devices firewall.
For this container, this is how it might look
Any traffic coming from port 80 passes through this IP and then go to the container.
Also, if you set another container with the same bridge, the containers then can contact each other.
So, that was it!
Top comments (0)