CyrixDX4 Posted August 30, 2019 Share Posted August 30, 2019 How do I add additional network interfaces to my docker containers? Use Case: Syncthing has the ability to be managed over one port but have the replication stream over another port. I want all replication over my 40gb network instead of my 1gb network I've searched all over this forum but still unsure where to put this in. Adding a device doesn't work as the container fails to recognize my bridge when I tell it to use "br4" Quote Link to comment
bonienl Posted August 30, 2019 Share Posted August 30, 2019 There is no GUI support for connecting a container to multiple networks. It is possible using CLI and the "docker network connect" command. If all you want is network segregation, it is possible to add another interface to docker (see Docker settings) and choose this network in the configuration of the container. Quote Link to comment
CyrixDX4 Posted August 30, 2019 Author Share Posted August 30, 2019 1 hour ago, bonienl said: There is no GUI support for connecting a container to multiple networks. It is possible using CLI and the "docker network connect" command. What's the point in then of the Devices field in Additional Settings? That doesn't make any sense. I didn't want to have to go the route of manual entry, if that's the only way.... Quote Link to comment
bonienl Posted August 31, 2019 Share Posted August 31, 2019 11 hours ago, CyrixDX4 said: What's the point in then of the Devices field in Additional Settings? The purpose of the Device field is to add a local device, such as a disk, to the container. You can't add networks this way and need to use the "docker network connect" command as explained before. Quote Link to comment
Jurre Posted September 1, 2019 Share Posted September 1, 2019 14 hours ago, bonienl said: The purpose of the Device field is to add a local device, such as a disk, to the container. You can't add networks this way and need to use the "docker network connect" command as explained before. You can configure the attach network command to be run after it creating the docker. If you go to ADVANCED VIEW when updating/creating a docker container. Under the Post Arguments line you can write the following: ; docker network connect NETWORK CONTAINER Now when UNRAID updates the container, it will run this command afterward to connect it to the right network. 1 3 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.