It is mirror of original repo
sudo mkdir /opt/docker
sudo chown <user> /opt/docker
git clone https://github.com/DmitriyLyalyuev/powerdns-no-ads /opt/docker/pdns
cd /opt/docker/pdns
docker-compose up -d mysql
To get MySQL console run:
docker exec -ti pdns_mysql_1 mysql -u root -p
Default root password for MySQL is '12345'.
Create user and database:
CREATE USER 'powerdns_user'@'%' IDENTIFIED BY 'powerdns';
GRANT ALL PRIVILEGES ON powerdns.* TO 'powerdns_user'@'%';
CREATE DATABASE powerdns;
exit
docker-compose up -d
This will run docker container with mount "/opt/docker/pdns/powerdns-server" folder to it as volume /etc/powerdns.
To update database run
docker exec -ti pdns_pdns_1 bash
cd /etc/powerdns/bind
./getnewlist.sh && ./import.sh && ./clean.sh
exit
It will download new ads servers lists and generate new sql dump file, then import it to the MySQL docker comtainer.
White list of domains you can specify on top of "getnewlist.sh".