Giter VIP home page Giter VIP logo

docker-pihole-unbound's Introduction

Pi-Hole + Unbound in one Container

Description

This Docker deployment runs both Pi-Hole and Unbound in a single container.

The base image for the container is the official Pi-Hole container, with an extra build step added to install the Unbound resolver directly into to the container not using instructions provided directly by the Pi-Hole team but by installing the latest available version of Unbound. It seems that using a package manager you will get an Unbound-version which is over 1 year old and might contain security-issues which have been solved in more recent versions.

Usage

First create a .env file to substitute variables for your deployment.

Pi-hole environment variables

Vars and descriptions replicated from the official pihole container:

Recommended variables

Variable Default Value Description
TZ UTC <Timezone> Set your timezone to make sure logs rotate at local midnight instead of at UTC midnight.
WEBPASSWORD random <Admin password> http://pi.hole/admin password. Run docker logs pihole | grep random to find your random pass.
FTLCONF_LOCAL_IPV4 unset <Host's IP> Set to your server's LAN IP, used by web block modes and lighttpd bind address.

Optional variables

Variable Default Value Description
DNSSEC false <"true"|"false"> Enable DNSSEC support
REV_SERVER false <"true"|"false"> Enable DNS conditional forwarding for device name resolution
REV_SERVER_DOMAIN unset Network Domain If conditional forwarding is enabled, set the domain of the local network router
REV_SERVER_TARGET unset Router's IP If conditional forwarding is enabled, set the IP of the local network router
REV_SERVER_CIDR unset Reverse DNS If conditional forwarding is enabled, set the reverse DNS zone (e.g. 192.168.0.0/24)
WEBTHEME default-light <"default-dark"|"default-darker"|"default-light"|"default-auto"|"lcars"> User interface theme to use.

Advanced variables

Variable Default Value Description
WEB_PORT unset <PORT> This will break the 'webpage blocked' functionality of Pi-hole however it may help advanced setups like those running synology or --net=host docker argument. This guide explains how to restore webpage blocked functionality using a linux router DNAT rule: Alternative Synology installation method

Example .env file in the same directory as your docker-compose.yaml file:

TZ=Europe/Amsterdam
WEBPASSWORD=QWERTY123456asdfASDF
WEB_PORT=8100
FTLCONF_LOCAL_IPV4=192.168.1.35
REV_SERVER=true
REV_SERVER_DOMAIN=local
REV_SERVER_TARGET=192.168.1.1
REV_SERVER_CIDR=192.168.0.0/16
HOSTNAME=pihole
DOMAIN_NAME=pihole.local
WEBTHEME=default-light
DNSSEC=true

Using Portainer stacks?

When using Portainer to deploy the stack might fail if you have a mapping to /etc/resolv.conf in your docker-compose.yaml-file. Removing the mapping will succeed, but you will end up with the default resolv.conf.

Running the stack

docker-compose up -d

If using Portainer, just paste the docker-compose.yaml contents into the stack config and add your environment variables directly in the UI.

docker-pihole-unbound's People

Contributors

chevyssinsd avatar chriscrowe avatar chronicblondiee avatar dkeppi avatar dszymczuk avatar gramsaran avatar lawnmo avatar mahl111 avatar pluim003 avatar promofaux avatar sinnohd avatar xaabi6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-pihole-unbound's Issues

Unbound could not open /etc/unbound/unbound.conf

Trying to deploy the last container version, using docker compose but unbound fail to start:

Starting unbound [1680123640] unbound-checkconf[386:0] error: Could not open /etc/unbound/unbound.conf: No such file or directory [1680123640] unbound[391:0] error: Could not open /etc/unbound/unbound.conf: No such file or directory [1680123640] unbound[391:0] warning: Continuing with default config settings [1680123640] unbound[391:0] error: can't bind socket: Cannot assign requested address for ::1 port 53 [1680123640] unbound[391:0] fatal error: could not open ports

Docker-compose one container malformed and missing variables

unfortunately the dockercompose one-container seems to be badly formed. If I paste it into Portainer I get parse errors which I am unable to resolve. In addition, the guide refers to some variables that are not specified in the .env file

After a lot of your attempt to speed up the chriscrowe repo update,
I hope you can help me solve these problems.
Thanks in advance

New Docker tag available 2023.01

Hello I wanted to inform you that after the tag
Docker Tag 2023.1.1
A new build has been done to correct the docker tag in the correct name
Docker Tag 2023.01

Thanks

mount /one-container/resolv.conf:/etc/resolv.conf: not a directory

Hello, when trying to install the one-container docker-compose with Portainer on my Raspberry Pi 4, I got the following error:
failed to deploy a stack: Network pihole-unbound_default Creating Network pihole-unbound_default Created Container pihole-unbound Creating Container pihole-unbound Created Container pihole-unbound Starting Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/data/compose/26/one-container/resolv.conf" to rootfs at "/etc/resolv.conf": mount /data/compose/26/one-container/resolv.conf:/etc/resolv.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
I'm not really sure as to what this error could mean, but is it trying to say that the compose is attempting to mount a directory instead of the resolv.conf file?

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.