Multiple Network Interfaces: How Do?


CyrixDX4

5 posts in this topic Last Reply

Recommended Posts

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"

 

 

Link to post

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.

 

Link to post
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....

Link to post
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.

 

Link to post
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.

 

afbeelding.thumb.png.d03a711c8f4f59195a10f3a828e001d7.png

  • Like 1
  • Thanks 2
Link to post

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.