Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Attaching a docker container to multiple docker networks

Featured Replies

In my unraid environment i have multiple networks for internal and external applications. There are some containers that i want to have access to both of those networks (eg Authentik & Traefik)

Am I able to have a container appear in both networks?

In docker compose that would be an equilivant of:
 

```

networks:

  front:

    external: true

  back:

    external: true

 

services:

  application:

    image: example/image

    networks:

    - front

    - back

```

 

Cheers

  • Author

@Mainfrezzer those options appear to only allow for a single network to be connected. They are (afaik) what the standard unraid template network option uses. 

 

Am I missing something?

  • 10 months later...

HI! Did you find any solution?

 

I have the same scenario as you, as I have Traefik and Authelia and different subnets and I want them to access both of those subnets.

 

I've tried:

docker network connect <bridge> <container-name>

without success. It creates another network interface (can see it via ifconfig) but creates it in the first place and traefik seems to stop working correctly.

 

Thanks in advance.

  • Community Expert
1 hour ago, adriaurora said:

 

 

I've tried:

docker network connect <bridge> <container-name>

without success. It creates another network interface (can see it via ifconfig) but creates it in the first place and traefik seems to stop working correctly.

 

Thats normal, apart from that, since you have been sparse with what "stop working correctly" is, i assume its connection broke, im gonna assume thats due to the changed default route. For some reason, docker has a wonky alphabetical-like order system. If you attach the network "bridge" it can cause it to take priority as default route, while something like the wgX interfaces might attach to it without that priority. You would have to fix that issue manually inside the container on starts up each time.

For anyone else interested into that, via dockerman you can add 
"&& docker network connect NETWORKNAME CONTAINERNAME" in post arguments

  • 1 year later...

@Mainfrezzer how does this work if you want something like swag to connect to all containers that are on the second network.

&& docker network connect public_swag all_public_containers ?

edit: I will answer my own question.

&& docker network connect public_swag swag

in my case swag is already on the private

Edited by parish99

  • 2 months later...

I really hope that this will be part of the UI one day, instead of having to manage the extra networks in the "Post Arguments".
The UI already supports showing the multiple networks, so it is a recognized thing, but just not manageable in the UI.
image.png

  • 1 month later...

Sorry to bring this one back up, but does anyone know if there is a way to map these to an IP based network as a bridge vs giving them an actual IP?

TLDR

I'm at the state Adam is above, they are connected and in use, but I'm looking to use selected apps in a network managed IP Vlan and then wanting some of the back-end (Statless,Database etc) to be on their own Network layer.

When I connect a bridged docker to a ipvlan its issued an IP and I'm trying to avoid having them consume the same IP's else I would just built another vlan and track more at the network side.

THoughts on how this can be done before I need to start a new thread and reference this chain )

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.