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.

[SOLVED][6.4.1] Preserve User Defined Networks for Docker - not showing up

Featured Replies

So I'm new to unRAID and it took a few looks around things to find the details in the help documentation for the Docker settings to find the new feature from @bonienl "Preserver User Defined Networks". First off thank you to him for this as I do like to use custom created networks. 

 

Description: When setting this option to YES, it is seeming to preserve the network through a reboot, but it is not making it available in the docker network type drop down as described. 

Help reads: 

Quote

Shows whether networks created outside of the GUI are removed or preserved for Docker. When preserved user defined networks become available in the Network type dropdown list of containers.

 

How to reproduce: Enable the setting under Settings > Docker > Advanced tab - Preserve User Defined Networks

 

Expected Results: Any custom created docker networks would now appear in the Network Type dropdown in the containers section.

 

Actual Results: Network Type dropdown in the containers section has no new entries matching the customer created networks.

Edited by 1activegeek

  • 3 weeks later...
  • Author

Coming to bump this topic from about a month ago. Haven't seen any responses. I'm hoping someone can help shed some light. I recently had to go through a cache upgrade, and in doing so I lost the configured docker networks. I was expecting this would have saved them, but to no avail as well. Happy to test and help resolve as this is an important feature that I do in fact utilize. 

It is working fine for me.

 

image.png.7b90fc4d78a2c183d04ac6d1551701f1.png

 

docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth1 my_network

image.png.5fcf3a2b82c0d595966a459064faf46a.png

 

Make sure that your own created networks do not conflict with the automatically created networks. A parent interface (here eth1) can only be used once!.

 

  • Author

Thanks @bonienl for the followup. Perhaps this has something to do with the way the "custom" networks are being discovered then? Here is my Docker settings in UR:

5aa58cc9601f1_ScreenShot2018-03-11at4_08_27PM.thumb.png.97062f696fdda4afdd346dba21505dd2.png

 

But you will notice here, that I have another customer network named "bridge2":

5aa58d321525b_ScreenShot2018-03-11at4_09_57PM.png.d3ced68d31d933598c9c9090ebd8475c.png

 

But this custom network is not showing up:

5aa58d610b30b_ScreenShot2018-03-11at4_10_55PM.thumb.png.06b180cc478768efc30b3af8d294c83c.png

 

Perhaps I needed to elaborate on the custom network not being picked up here. ;o)

9 minutes ago, 1activegeek said:

Perhaps I needed to elaborate on the custom network not being picked up here. ;o)

 

The current implementation only looks for additional macvlan custom networks. You have a second custom bridge network which is not included.

 

And eth0 is not created because it has the same gateway as br1, which Docker doesn't allow. You either remove the gateway from eth0, or give it a unique value.

Edited by bonienl

  • Author

Ahhh, ok that would explain it then. Anywhere you can point me to the code that looks for macvlan, so I can look at possible adaptation for bridge networks as well? Thankfully I only have the one, but would be nice to be able to have it save these custom networks as well. 

I am afraid it is not as simple as changing 1 line of code to include custom bridge networks. I recommend you use macvlan for all your custom networks.

  • Author

Got it, I was thinking more about understanding the code that was used for presenting the data inside of unRAID. I figured weeding out individual bridge networks would be more difficult. Unfortunately, my use case wouldn't work as well using macvlan based networking. I'm using the bridge network to let docker do its normal networking for containers, but provide name resolution which the default network does not. If I switch to macvlan, I expose the containers to the local network which I do not want to do at all. 

If you absolutely need to use a custom bridge network, just pick None in the network dropdown, and add to "extra parameters" "--network bridge2"

  • Author

Thanks ken-ji, that's what I'm doing right now, though I just leave it for bridge. The --net=bridge2 setting I use will override it anyway on creation. I just wish these additional networks could be saved. It shouldn't happen often, but I'd imagine things like OS updates in the future and possible upgrades to the docker core system could possibly wipe these out. Additionally if there is a loss then I would need to re-create them. It's not extremely difficult, just would be a nice to have. I'll mark this as resolved.  Whoops, I guess that's not an option here. Oh well. 

Edited by 1activegeek

15 hours ago, 1activegeek said:

I'll mark this as resolved.  Whoops, I guess that's not an option here. Oh well. 

It is, you edit the first post in the thread and change the title.

  • Author

Aha! Thank you jonathanm! That helps. Wasn't aware I had to do it that way. All set now. 

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.