This example provides a base setup for using [Pi-hole](https://docs.pi-hole.net/) with the [cloudflared DoH](https://docs.pi-hole.net/guides/dns/cloudflared/) service.
More details on how to customize the installation and the compose file can be found in [Docker Pi-hole documentation](https://github.com/pi-hole/docker-pi-hole).
Sometimes, it can happen that there occurs a problem starting pihole-FTL.
I personally had this issue when adding this line to the shared volumes:
```
- "/pihole/pihole.log:/var/log/pihole.log"
```
To fix this issue, I found this [issue](https://github.com/pi-hole/docker-pi-hole/issues/645#issuecomment-670809672),
which suggested adding an empty file (`touch /pihole/pihole.log`) to prevent it from creating a directory.
The directory would not allow starting pihole-FTL and result in something like this:
```
# Starting pihole-FTL (no-daemon) as root
# Stopping pihole-FTL
...
```
If you created an empty file, you may also check the ownership to prevent permission problems.
### - Installing on Ubuntu may conflict with `systemd-resolved` - see [Installing on Ubuntu](https://github.com/pi-hole/docker-pi-hole#installing-on-ubuntu) for help.
### - Environment variables are version-dependent
Environment variables like "CONDIIONAL_FORWARDING*" and "DNS1" are deprecated and replaced by e.g. "REV_SERVER*" and "PIHOLE_DNS" in version 5.8+.
Current information about environment variables can be found here: https://github.com/pi-hole/docker-pi-hole