Giter VIP home page Giter VIP logo

Comments (1)

bluefangs avatar bluefangs commented on August 24, 2024

I have an update.
I tried to work with the exact settings privided by you in the compose file. It works as intended EXCEPT for the fact that I'm unable to get the DHCP server of pi working.
I even triedto add

network_mode: 'host'
    cap_add:
      - NET_ADMIN

but still, to no avail. Any solutions on how to get the DHCP server working with this? Below is the yml file I'm using via portainer:

version: "3.7"

# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md

services:
  pihole:
    
    image: pihole/pihole:latest
    hostname: "pihole"    
    deploy:
      mode: replicated
      replicas: 1
      update_config:
        delay: 30s
      placement:
        constraints: [node.role == manager]
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
     - "53:53/tcp"
     - "53:53/udp"
     - "67:67/udp"
     - "80:80/tcp"
     - "443:443/tcp"
    network_mode: 'host'
    cap_add:
      - NET_ADMIN

    environment:
      TZ: "Asia/Kolkata"
      WEBPASSWORD: "some_password"
      DNS1: "172.18.0.1#5053"
      DNS2: "172.18.0.1#5053"
      DNS_FQDN_REQUIRED: "true"
      DNS_BOGUS_PRIV: "true"
      DNSSEC: "false"
      CONDITIONAL_FORWARDING: "true"
      CONDITIONAL_FORWARDING_IP: "192.168.0.1"
      CONDITIONAL_FORWARDING_DOMAIN: "home.local"
      CONDITIONAL_FORWARDING_REVERSE: "0.168.192.in-addr.arpa"
    # Volumes store your data between container upgrades
    volumes:
      - etc-pihole:/etc/pihole/
      - etc-dnsmasq.d:/etc/dnsmasq.d/
      # run `touch ./var-log/pihole.log` first unless you like errors
      # - var-log:/var/log/
    dns:
      - "127.0.0.1"
      # - "1.1.1.1" # fallback

  cloudflared:
    # Pinned to arm/v7 digest for crazymax/cloudflared:2020.2.0
    image: crazymax/cloudflared:latest
    deploy:
      mode: replicated
      replicas: 1
      update_config:
        delay: 30s    
      placement:
        constraints: [node.role == manager]
    ports:
      - target: 5053
        published: 5053
        protocol: udp
      - target: 49312
        published: 49312
        protocol: tcp
    environment:
      - "TZ=America/New_York"
      - "TUNNEL_DNS_UPSTREAM=https://1.1.1.1/dns-query,https://1.0.0.1/dns-query"
volumes:
  etc-pihole: {}
  etc-dnsmasq.d: {}
  var-log: {}

from raspi-docker-stacks.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.