Radarr / Sonarr (mono) can't connect to DNS running on local host

Hi,

I’m running pi-hole, sonarr, radarr, nzbget, and am pulling my hair out trying to figure out how to modify DNS settings for my Radarr / Sonarr containers to use my pi-hole DNS server - which is another container running on the same host.

Radarr / Sonarr are running on mono using the mono baseimage (lsiobase/ubuntu:xenial). The s6 overlay in the mono container makes troubleshooting harder; I’ve tried passing in an alternate resolv.conf file and also setting dns environment variables via docker-compose, both without success. Even when I attempt to point the DNS to an external IP address (e.g. 1.1.1.1) it still fails…
Any ideas how I can successfully update DNS settings for these containers?

Other containers that aren’t using mono are working fine - I had the same issue with the nzbgetbut I was able to pass an updated resolv.conf file (via docker-compose.yml) to point DNS to the Docker host interface (172.17.0.1) which works.

Here’s the docker-compose.yml I’m using:

-------
version: '2'
services:
  radarr:
    image: linuxserver/radarr
    container_name: radarr
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./config/config:/config
      - ./config/downloads:/downloads
      - ./config/movie:/movies
      - './config/general/config/resolv.conf:/etc/resolv.conf'
    environment:
      - TZ=xxxx
      - PUID=0
      - PGID=101
    dns: 1.1.1.1
    ports:
        - 7878:7878
-------

The issue I assume you’ve got is (please correct me if I’m wrong), you’ve got pi-hole running in a container with it’s own ip? if so, macvlan blocks everything else on that host from communicating with that ip as it’s a “security features”.

I’ll have a think about the other issue…

Yes the container will have it’s own IP, but wouldn’t that mean that nzbget would also not work if that was the case?

The setup is running on a Synology NAS, so pihole exposes port 43 (plus the other ports) on the NAS, other devices on the network work great.
I was able to get nzbget working (also on the same docker network on the NAS) when I configured DNS to point to the docker network interface on the local system (172.17.0.1). As expected, it fails when DNS was configured to use the IP of the NAS itself.

I’ll do some reading on macvlan though, I’ve not familiarised myself with that.

I find not having ping to troubleshoot network connectivity within the container really difficult, is there an alternative in the s6 overlay?

there is no alternative, but you can just use the tshoot docker mod; go to any of our container’s readme, scroll down to mods, click universal, pick tshoot, follow instructions

This post was flagged by the community and is temporarily hidden.