Jump to content
aptalca

(Added in 6.5.1) Docker - user defined bridge networks

7 posts in this topic Last Reply

Recommended Posts

Posted (edited)

@bonienl

 

I love that unraid now contains a lot of networking functionality especially with regards to docker. Being able to assign separate IPs to containers via macvlan and such is very cool.

 

However, my request is for something much simpler. As you know, by default (with the bridge option) docker containers are put on the default "bridge" network. They are allowed to connect to the host and each other via internal IPs, but not via dns. But the user defined bridge networks also allow for connections via dns, using the container name as the hostname (ie. http://sonarr).

 

Unraid currently does not manage these networks (in fact deletes them unless the option for not deleting is selected in advanced docker settings). It would be nice if unraid supported creating a basic user defined bridge network and presented it as a drop down option for network type in the container settings. 

 

My real motivation behind this is that at linuxserver.io we are trying to create a repo of reverse proxy configs for our letsencrypt image and being able to define the proxy targets as "http://containername" works as a standard way unlike the current method of using "http://unraidip:port" which is different for every user.

 

Thanks

Edited by aptalca
  • Like 3

Share this post


Link to post
Posted (edited)

I added the possibilitty to choose custom bridge networks too in the dropdown list of available networks to a container.

 

It is still required though to create a custom bridge network manually from CLI. E.g I created custom network "my-bridge".

docker network create my-bridge

or if you want a specific subnet for the bridge network

docker network create --subnet=192.168.255.0/24 my-bridge

 

image.thumb.png.8d6cb6be06b3cf92e5df35dc0e7ab088.png

Edited by bonienl

Share this post


Link to post

Thanks, this is great.

 

When you say you added it, do you mean it was already added in 6.5.0 or it will be in the next stable? Because on 6.5.0 the custom network I created doesn't show up in the drop down (although I didn't restart the server yet).

 

Thanks

Share this post


Link to post

Feature will come in a future release.

Share this post


Link to post
On 4/16/2018 at 4:17 PM, bonienl said:

Feature will come in a future release.

 

Thanks so much, this works great in 6.5.1

It even adds the ability to assign static IPs in that subnet, pretty cool

Share this post


Link to post

Think I'm going to try this out, got a project in mind.  Thanks @bonienl

Share this post


Link to post

Just ran across this thread today while figuring out how to achieve this behavior without `--link` flags.  I noticed I could choose custom networks, but I wasn't sure how to create a persistent custom network.  Thanks for the short write-up.  I'm basically building exactly what OP mentioned with the standard linuxserver.io nginx image.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now