Jump to content

How to use docker bridge link containers


Recommended Posts

As we know, if we use bridge network mode, all docker containers will get a dedicated IP like 172.17.0.*. 

But when you reboot some docker containers, those IPs will change. so it is very inconvenient to use IP.

I don't want to use unraid IP, because I think it will let all data transfer back and forth in the router.

 

Is there any way to use something like hostname to links containers on unraid?

Edited by DearTanker
Link to comment
2 minutes ago, Squid said:

Why would you directly use those IPs?  Usual way to communicate with a container would via the host IP and applicable port.

I don't want to use unraid IP, because I think it will let all data transfer back and forth in the router.

 

Like "unraid-ip:123 --> router --> unraid-ip:456 --> router --> unraid-ip:123".

Link to comment
  • 3 months later...

As long as your server is wired, data will not traverse the router unless it being used by a wireless client or if the client is on a different subnet than the server. Meaning, if you are trying to read from InfluxDB container from Grafana container, via the server IP, the data will not traverse your router. It will be horseshoed through the eth0 interface.

 

Make sense?

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...