This is exactly this offical project (https://github.com/pi-hole/docker-pi-hole) just "compresed" to single docker-compose.yaml file with few improvements (in my opinion) ;)
Feel free to use!
- moved environments variables to
.envand.env.localfiles, - moved cron file to root dir,
- added
update.shscript for easily update your Pi-hole.
Dowload or clone repo, go to root dir, create and fill .env.local (for detailed information about environment variables look into offical repository) file and just run docker compose command.
cd /path/to/simple-docker-pi-hole
docker compose up -dTo enable several automatic operations, like flush logs and update ad sources, add this file to your crontab.
crontab docker-pi-hole.cronSimply run the script. It will download the new version, delete old containers and build the new one.
cd /path/to/pihole-enhanced
./update.sh