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.

Docker shared network stack (e.g. docker run --network='container:<name|ID>')

Featured Replies

Docker has some functionality where multiple containers can share the same network namespace by using --network='container:<name|id>'. Here's the relevant documentation from the docker run network settings docs:

--network="bridge" : Connect a container to a network
                      'bridge': create a network stack on the default Docker bridge
                      'none': no networking
                      'container:<name|id>': reuse another container's network stack
                      'host': use the Docker host network stack
                      '<network-name>|<network-id>': connect to a user-defined network

I implemented this without a problem in prior versions of Unraid by setting the Docker "Network Type" in the Unraid template to "None", then setting the "Extra Parameters" to "--network='container:NAME'". This would yield a docker run command that had both the "--network='none'" and "--network='container:NAME'" parameters.

 

This worked great until I updated to Unraid 6.8. It looks the new version of docker no longer allows you to overload the "--network='none'" parameter with the "--network='container:NAME'" parameter and throws this error:

/usr/bin/docker: Error response from daemon: Container cannot be connected to network endpoints: container:NAME, none.
See '/usr/bin/docker run --help'.

So, I've got two questions to try and sort this out:

  1. Is there a way in the Unraid template to not send a "--network" parameter? If so, I could just take care of that in the "Extra Parameters". If not, it would be great to add the functionality.
  2. Is there a way in the Unraid template to set the network to "container:NAME"? I tried to edit the underlying XML, but it doesn't look like the templating engine is picking up changes. If this is not an option, it would be great to add the functionality


I appreciate any help. Thanks!

Had the same issue, I rollback to 6.7.2.

 

We should have the possibility to edit the network field manually in advanced mode instead of putting net:container in extra parameters

13 hours ago, burkasaurusrex said:

Docker has some functionality where multiple containers can share the same network namespace by using --network='container:<name|id>'. Here's the relevant documentation from the docker run network settings docs:


--network="bridge" : Connect a container to a network
                      'bridge': create a network stack on the default Docker bridge
                      'none': no networking
                      'container:<name|id>': reuse another container's network stack
                      'host': use the Docker host network stack
                      '<network-name>|<network-id>': connect to a user-defined network

I implemented this without a problem in prior versions of Unraid by setting the Docker "Network Type" in the Unraid template to "None", then setting the "Extra Parameters" to "--network='container:NAME'". This would yield a docker run command that had both the "--network='none'" and "--network='container:NAME'" parameters.

 

This worked great until I updated to Unraid 6.8. It looks the new version of docker no longer allows you to overload the "--network='none'" parameter with the "--network='container:NAME'" parameter and throws this error:


/usr/bin/docker: Error response from daemon: Container cannot be connected to network endpoints: container:NAME, none.
See '/usr/bin/docker run --help'.

So, I've got two questions to try and sort this out:

  1. Is there a way in the Unraid template to not send a "--network" parameter? If so, I could just take care of that in the "Extra Parameters". If not, it would be great to add the functionality.
  2. Is there a way in the Unraid template to set the network to "container:NAME"? I tried to edit the underlying XML, but it doesn't look like the templating engine is picking up changes. If this is not an option, it would be great to add the functionality


I appreciate any help. Thanks!

Someone on reddit told me to create a network with the name of your container, look at this https://www.reddit.com/r/unRAID/comments/ebgt06/have_you_guys_noticed_any_quirks_or_bugs_in_68/fb9fr1t/?st=k4bal2a9&sh=3b483579

  • Author
7 hours ago, jedduff said:

Someone on reddit told me to create a network with the name of your container, look at this https://www.reddit.com/r/unRAID/comments/ebgt06/have_you_guys_noticed_any_quirks_or_bugs_in_68/fb9fr1t/?st=k4bal2a9&sh=3b483579

Awesome - this worked perfectly for me. Thanks @jedduff!

 

For posterity, open terminal and run:

docker network create container:NAME

Then change "Network" to "CUSTOM:conatiner:NAME" in all of the Unraid Docker templates.

 

Probably worth changing the Unraid setting to preserve customer network names as well.

Archived

This topic is now archived and is closed to further replies.

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.