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 - containers not following unRAID's /etc/resolv.conf settings... [RC6A]

Featured Replies

I know this is more related to the individual docker containers that I'm using, but this should be something that Limetech and all docker authors address.

 

It seems that the Docker system is not respecting what the main host has set for /etc/resolv.conf.

Also, the Docker Plugin system does not provide a means of specifying the value via the "--dns" docker command parameter.

 

root@REAVER:/etc/rc.d# cat /etc/resolv.conf

# Generated by dhcpcd from br0

# /etc/resolv.conf.head can replace this line

domain <<obfuscated domain name removed>>

nameserver 10.0.0.128

# /etc/resolv.conf.tail can replace this line

 

root@REAVER:/etc/rc.d# docker ps -a

CONTAINER ID        IMAGE                          COMMAND            CREATED            STATUS              PORTS                                                        NAMES 

2fcd05628929        gfjardim/nzbget:latest        "/sbin/my_init"    8 days ago          Up 25 minutes      0.0.0.0:7070->6789/tcp, 0.0.0.0:7073->6791/tcp                NZBGet         

f5097c71f899        gfjardim/transmission:latest  "/sbin/my_init"    8 days ago          Up 25 minutes      54321/tcp, 0.0.0.0:9091->9091/tcp, 0.0.0.0:12290->12290/tcp  Transmission   

 

root@REAVER:/etc/rc.d# docker exec -ti Transmission /bin/bash

root@f5097c71f899:/# cat /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

root@f5097c71f899:/# exit

 

root@REAVER:/etc/rc.d# docker exec -ti NZBGet /bin/bash

root@2fcd05628929:/# cat /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

root@2fcd05628929:/# exit

 

 

 

  • 1 month later...

I'm curious what the actual "issue" is here.  What's your setup where respecting the hosts resolv.conf is causing a problem for you?

  • Author

I'm curious what the actual "issue" is here.  What's your setup where respecting the hosts resolv.conf is causing a problem for you?

 

The problem is the dockers were using a different nameserver instead of the one I have set on the unraid host.

 

When I checked my routers connection log I saw a metric ton of connections to an external dns, (Google 8.8.8.8) but once I corrected the issue, all of those connections went away as expected.

 

To fix this permanently and going forward, I now map /etc/resolv.conf from host to container.

So with your ability to map etc/resolve.conf, is this really an issue anymore?

  • Author

Not an actionable item for now...

 

It should still be considered for templates for official unraid dockers or community dockers created.

 

 

Ok, I agree with your point on templates. If we offer the option to bind time, we should probably offer the same for resolv.conf

Ok, I agree with your point on templates. If we offer the option to bind time, we should probably offer the same for resolv.conf

 

This sounds like a great solution

adding to best practice thread.

  • 4 months later...
  • Author

This issue is finally solved in unraid 6.0 rc6a.

  • 2 years later...

How?  It doesn’t seem to be passing for me. Is it auto or manual setting

2 hours ago, Timbiotic said:

How?  It doesn’t seem to be passing for me. Is it auto or manual setting

If you have a problem you should probably start a new thread and post some details. This thread that you have replied to is over 2 years old.

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.