September 29, 20232 yr 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
September 29, 20232 yr Community Expert https://docs.docker.com/engine/reference/commandline/network_connect/#usage and https://docs.docker.com/engine/reference/commandline/network_connect/#connect-a-container-to-a-network-when-it-starts
September 30, 20232 yr 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?
August 7, 20241 yr 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.
August 7, 20241 yr 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
January 6Jan 6 @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 swagin my case swag is already on the private Edited January 6Jan 6 by parish99
March 13Mar 13 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.
May 2May 2 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?TLDRI'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.