Sivivatu Posted September 29, 2023 Share Posted September 29, 2023 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 Quote Link to comment
Mainfrezzer Posted September 29, 2023 Share Posted September 29, 2023 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 Quote Link to comment
Sivivatu Posted September 30, 2023 Author Share Posted September 30, 2023 @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? Quote Link to comment
adriaurora Posted August 7 Share Posted August 7 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. Quote Link to comment
Mainfrezzer Posted August 7 Share Posted August 7 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 Quote Link to comment
Recommended Posts
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.