Update pihole docker container

Comments

4 comments

  • Avatar
    Mike

    I specify the version in my compose yaml and use cloudflared for DoH.   Running v5.3.4 that dropped a few days ago just fine.

    Here’s my docker-compose.yaml.   I’ve been using the procedure OP mentioned along with Firewalla’s persistent config storage without issue.  Docker standard protocol is to compose fresh containers for updates.  

    version: "3"

    # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
    services:
    cloudflared:
    container_name: cloudflared
    # Restart on crashes and on reboots
    restart: unless-stopped
    image: cloudflare/cloudflared:2020.12.0
    command: proxy-dns
    environment:
    - "TUNNEL_DNS_UPSTREAM=https://1.1.1.1/dns-query,https://1.0.0.1/dns-query,https://9.9.9.9/dns-query,https://149.112.112.9/dns-query"

    # Listen on an unprivileged port
    - "TUNNEL_DNS_PORT=5053"

    # Listen on all interfaces
    - "TUNNEL_DNS_ADDRESS=0.0.0.0"

    # Attach cloudflared only to the private network
    networks:
    default:
    ipv4_address: 172.16.0.3

    pihole:
    container_name: pihole
    image: pihole/pihole:v5.3.4
    environment:
    # set a secure password here or the default will be firewalla
    WEBPASSWORD: 'Password'
    DNS1: '172.16.0.3#5053'
    DNS2: 'no'
    # Volumes store your data between container upgrades
    volumes:
    - '/data/pi-hole/etc-pihole/:/etc/pihole/'
    - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    - '/etc/localtime:/etc/localtime:ro'
    restart: unless-stopped
    networks:
    default:
    # static IP address for pi-hole
    ipv4_address: 172.16.0.2

    networks:
    default:
    driver: bridge
    ipam:
    config:
    # your chosen docker network here
    - subnet: 172.16.0.0/24
    0
    Comment actions Permalink
  • Avatar
    Lestrod Gould

    Thanks Mike.

    Is specifying the version in the yaml file a requirement or can you leave it as latest and still do the update? 

    Did you experience any network outage during the update?

    0
    Comment actions Permalink
  • Avatar
    Mike

    The latest tag should work fine for these two, just my preference to make it compose a known good container until I modify.

    I ran the commands within a minute and didn’t notice any downtime.   For sure that brief period after down command before starting will kill DNS response to your network.  If someone is streaming Netflix, I doubt they would notice anything.

    I have localhost set to bypass in pi-hole, this lets me use the Firewalla app DNS Booster setting to bypass pi-hole rather than the pi-hole web UI for any clients that may need.

    BTW for anyone, my update syntax: Execute from the ./.firewalla/run/docker/pi-hole dir:

    sudo docker-compose pull
    sudo docker-compose down
    sudo docker-compose up —-detach
    sudo systemctl start docker-compose@pi-hole

     

    0
    Comment actions Permalink
  • Avatar
    MarkW

    Hi Mike.  Surely a dumb question here, but when you specify

    DNS1: '172.16.0.3#5053'

    in the yaml, what effect does that have if you've changed upstream DNS settings in the web UI for pi-hole?  Should you see 172.16.0.3 as the upstream DNS, or does this setting override whatever settings are in pi-hole?  I set upstream DNS1 in pi-hole UI to be 172.16.0.3 and it stopped resolving.  I changed it back to google and it worked again.  I'm wondering if my requests are going to cloudflared or how I can tell.

    0
    Comment actions Permalink

Please sign in to leave a comment.