Pi-hole Synology setup

Hi,
I am trying to modify Tony Lawrence's new guide at

and I'm a bit stuck. Here is my (Tonys modified) .yaml file

    # Note: 192.168.123.xxx is an example network, you must update all these to match your own.
version: '2'
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    hostname: pihole
    domainname: servicemax.private             # <-- Update
    mac_address: d0:ca:ab:cd:ef:11
    cap_add:
      - NET_ADMIN
    networks:
      pihole_network:
        ipv4_address: 172.16.1.222   # <-- Update
    dns:
      - 127.0.0.1
    ports:
      - 443/tcp
      - 53/tcp
      - 53/udp
      - 67/udp
      - 80/tcp
    environment:
      ServerIP: 172.16.1.222         # <-- Update (match ipv4_address)
      VIRTUAL_HOST: pihole.servicemax.private  # <-- Update (match hostname + domainname)
      WEBPASSWORD: "pass"                   # <-- Add password (if required)
    restart: unless-stopped
    volumes:
      - /volume2/docker/pihole/volume:/etc/pihole:rw
      - /volume2/docker/pihole/config/hosts:/etc/hosts:ro
      - /volume2/docker/pihole/config/resolv.conf:/etc/resolv.conf:ro
      - /volume2/docker/pihole/config/dnsmasq.conf:/etc/dnsmasq.d/02-network.conf:ro
networks:
  pihole_network:
    driver: macvlan
    driver_opts:
      parent: ovs_eth0
    ipam:
      config:
        - subnet: 172.16.1.0/24            # <-- Update
          gateway: 172.16.1.1             # <-- Update
          ip_range: 172.16.1.20/28        # <-- Update

and here is the output of Docker on Synology

    [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying... 
s6-chown: fatal: unable to chown /etc/resolv.conf: Read-only file system
s6-chmod: fatal: unable to change mode of /etc/resolv.conf: Read-only file system
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing... 
stty: 'standard input': Inappropriate ioctl for device
 ::: Starting docker specific setup for docker pihole/pihole
OK: Checks passed for /etc/resolv.conf DNS servers
nameserver 127.0.0.1
nameserver 54.252.183.4
nameserver 54.252.183.5
stty: 'standard input': Inappropriate ioctl for device
  [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u1
  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [i] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf...
  [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Setting password:pass
  [✓] New password set
Using default DNS servers: 8.8.8.8 & 8.8.4.4
DNSMasq binding to default interface: eth0
+ pihole -a -p pass pass
Added ENV to php:

			"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",

			"ServerIP" => "172.16.1.222",

			"VIRTUAL_HOST" => "pihole.servicemax.private",
Using IPv4 and IPv6
::: setup_blocklists now setting default blocklists up: 
::: TIP: Use a docker volume for /etc/pihole/adlists.list if you want to customize for first boot
::: Blocklists (/etc/pihole/adlists.list) now set to:
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
 ::: Docker start setup complete
  [i] Pi-hole blocking is enabled
  [✗] DNS resolution is currently unavailable

Now, the 'DNS resolution is currently unavailable' is because I have the Google DNS servers blocked at my router. The actual error is further up, where it shows I have my DNS servers set correctly
nameserver 54.252.183.4
nameserver 54.252.183.5

and yet later in startup it says
Using default DNS servers: 8.8.8.8 & 8.8.4.4

what have I done wrong?

In addition, I have something wrong with the network setup- I can't get through to the ip address of the pi-hole. Is ip_range wrong? I couldn't figure out the instructions well enough...

to be clear, my main network is 172.16.1.0/24
and I am trying to use 172.16.1.222 for the pi-hole

cheers for any help

4.2.1 docker image had a bug where it wasn't properly populating the adlists and that can cause issues with the startup of DNS/gravity.

Please try pulling the latest image to get 4.2.2 which fixes the issue. You might have remove your adlists.list file from your docker volume to get it to update with the proper default lists too.

I dont know if this has been resolved but ip_range: 172.16.1.20/28 for macvlan is wrong for the address you are stating in ipv4_address: 172.16.1.222.

ip_range: 172.16.1.20/28 is a Usable Host IP Range of 172.16.1.17 - 172.16.1.30

If you dont plan on running any other containers in the macvlan you are creating then use (ip_range: 172.16.1.222/32). Otherwise use a calculator like IP Subnet Calculator to figure out what the ip range should be used for what you need.

The ip_range is the range of ip's you are allowing docker to use on the macvlan.

Hey @Beefyfish,
Thanks for that info- I got distracted by a more urgent project but my intention is to fix this and write it up in a less technical way, so any help is much appreciated- thank you!