Jump to content

[unRAID 6.5.3] Multiple networks/bridge + host?


LittleMike

Recommended Posts

Hello all,

 

I'm wondering if there is a way to use both bridge and host network types for a container. My use case is that I have a bunch of containers on bridge, including Traefik that I'm using as a reverse proxy. I've set up subdomains and Traefik is working great with the exception of Plex, which is my only container set to Host. I'd like to be able to set up plex.domain.com and that's where I've run into a snag. I know it's strictly not necessary because Plex authenticates externally anyway and as long as remote access is working, I can get to my Plex server, but for the sake of consistency, I want to be able to subdomain all the containers. Is this something that's possible or am I just out of luck?

Link to comment
6 hours ago, bonienl said:

It is not possible to mix a host network with another network type. A host network is an exclusive network.

 

You are allowed to mix bridge and macvlan (custom) networks or use multiple bridge networks.

 


Got it. I'm guessing the reason for the host network in general is so that the container appears as if it's originating from the host IP, is that correct? So what would be my options for getting Traefik to see Plex? Would I have to create a custom network? When you say multiple bridge, do you mean use the bridge dropdown on multiple containers?

Link to comment
3 hours ago, LittleMike said:

Got it. I'm guessing the reason for the host network in general is so that the container appears as if it's originating from the host IP, is that correct?

 

Correct, containers using the host network all appear as originating from the host itself, hence they need to use unique TCP/UDP ports each to avoid conflicts.

 

3 hours ago, LittleMike said:

So what would be my options for getting Traefik to see Plex? Would I have to create a custom network?

 

All containers attached to the same custom network can communicate with each other.

 

3 hours ago, LittleMike said:

When you say multiple bridge...

 

The GUI allows only for a single bridge network, but it is possible to add more bridge networks through CLI. A container may participate in those bridge networks simultaneously.

 

CLI is required to let a container participate in more than one network.

Link to comment
3 minutes ago, bonienl said:

 

Correct, containers using the host network all appear as originating from the host itself, hence they need to use unique TCP/UDP ports each to avoid conflicts.

 

 

All containers attached to the same custom network can communicate with each other.

 

 

The GUI allows only for a single bridge network, but it is possible to add more bridge networks through CLI. A container may participate in those bridge networks simultaneously.

 

CLI is required to let a container participate in more than one network.


But you can't do a "docker network connect" to a custom network as well as host, no? When I tried doing that through the CLI it gave me a docker daemon error. So I'd have to connect to bridge + custom or something along those lines (through CLI, of course) in order to get it to work?

At this point it may just be easier to keep Plex on host and call it a day. It looks like people run into problems putting Plex on bridge instead of host.

Link to comment
7 minutes ago, LittleMike said:

But you can't do a "docker network connect" to a custom network as well as host, no?

 

Right. Docker doesn't allow a host network to be mixed with another network.

Allowed combinations are: bridge + bridge, bridge + custom or custom + custom.

Link to comment
4 minutes ago, bonienl said:

 

Right. Docker doesn't allow a host network to be mixed with another network.

Allowed combinations are: bridge + bridge, bridge + custom or custom + custom.


Thank you for the clarification. In the case of Plex, it seems like it may be more effort than it's worth just to be able to put it on a subdomain. :P But now at least I know the limitations and I can play around. On a side note, not that it's difficult to drop to bash to accomplish some things, but it would be a hell of a lot easier if you could add networks (essentially do a docker network connect) from within the web GUI.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...