Recipe for Unbound container in rpi

Conf file

upstream DNS conf file (save as home/pi/unbound-rpi-docker/forward-google.conf)

forward-zone:
      name: "."
        # forward-addr: 1.1.1.1           # Cloudflare
        forward-addr: 8.8.8.8            # Google
        # forward-addr: 4.2.2.4           # Level(3)

docker compose file

docker-compose.yml

name: unbound
services:
    unbound-rpi:
        container_name: unbound-rpi
        volumes:
            - /home/pi/unbound-rpi-docker/forward-google.conf:/opt/unbound/etc/unbound/forward-records.conf:ro
        ports:
            - 53:53/udp
            - 53:53/tcp
        restart: unless-stopped
        image: mvance/unbound-rpi:latest