Jump to content

[unRAID-6.9.2] Docker Networking Questions


Go to solution Solved by amura11,

Recommended Posts

I'll preface this with: I'm moving to unRAID from Proxmox and I have some Docker experience but when it comes to unRAID I'm a dumb.

 

I have my local network segregated into different partitions for different purposes (I manage this by hand). For example 10.0.1.0/24 is where I keep all my servers (via static DCHP leases) and 10.0.3.0/24 is where I have all my regular DHCP leases. When I was using Proxmox I would start a new VM/Container, let it grab a DHCP lease, then converted that lease to a static lease. If I needed my VMs/Containers to talk to each other I would use hostnames to facilitate that. Is it possible to do this using Docker in unRAID?

 

I know Docker can have it's own internal networks but I want to be able to connect to my containers via other devices on my network and not have to share the hosts ports. Looking at the Docker settings it looked like the br0 network that is setup might be able to do this. However, when I tried using this network the IP assigned to my container was not one in the range of my DHCP leases.

 

If I use the br0 network will hostnames work? And one final noob question, what is the hostname of a container/app? Is it just it's name?

 

I appreciate any help, unRAID looks like it'll be awesome once I can wrap my brain around some of these concepts.

Link to comment

I think I'm going about this wrong. What I want to be able to do, it it's possible, is to be able to connect to my containers via hostname both by other containers and by other devices on my network.

 

Using the br0 network I'm able to connect to the containers using their IP addresses (how that's working I can only guess is magic) but I'm not able to connect using the hostname. Or I just don't know what the hostname is and this is all working.

Link to comment
  • Solution

After some reading and contemplation I realized I was going about this totally the wrong way. Trying to get Docker to behave like Proxmox was the big mistake here. There appears there are ways to expose a Docker network so that external computers can access the containers by hostname by proxy-ing DNS through the Docker network. That doesn't solve the DHCP issue though.

 

The real solution was to not do that at all. I ended up creating a custom bridge network in Docker and put my containers on that network. This allows the containers to reach each other by their container name (as long as they are on the same network). This makes setting up services that reference each other (like the various *arrs) much easier. To access my containers on my LAN/WAN I used reverse proxies for most services and for the few services I wanted to directly access locally (such as streaming services) I forwarded their ports to the host and access them that way.

 

Coming from Proxmox put me in the wrong headspace and after wrapping my head around unRAID/Docker it made things way clearer and ultimately way easier.

  • Like 1
Link to comment

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.

×
×
  • Create New...