{"id":13821682,"url":"https://github.com/m4rcu5nl/docker-pdns-recursor-alpine","last_synced_at":"2026-05-19T00:36:36.960Z","repository":{"id":87253096,"uuid":"102038546","full_name":"m4rcu5nl/docker-pdns-recursor-alpine","owner":"m4rcu5nl","description":"Docker image for PowerDNS-recursor 4.1.9 on Alpine 3.8","archived":false,"fork":false,"pushed_at":"2019-05-17T01:51:09.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T06:28:58.825Z","etag":null,"topics":["alpine-linux","docker-image","pdns-recursor"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m4rcu5nl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-31T19:43:56.000Z","updated_at":"2019-05-17T01:51:11.000Z","dependencies_parsed_at":"2023-05-27T03:00:21.815Z","dependency_job_id":null,"html_url":"https://github.com/m4rcu5nl/docker-pdns-recursor-alpine","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4rcu5nl%2Fdocker-pdns-recursor-alpine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4rcu5nl%2Fdocker-pdns-recursor-alpine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4rcu5nl%2Fdocker-pdns-recursor-alpine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4rcu5nl%2Fdocker-pdns-recursor-alpine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m4rcu5nl","download_url":"https://codeload.github.com/m4rcu5nl/docker-pdns-recursor-alpine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243924043,"owners_count":20369644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine-linux","docker-image","pdns-recursor"],"created_at":"2024-08-04T08:01:25.846Z","updated_at":"2026-05-19T00:36:36.912Z","avatar_url":"https://github.com/m4rcu5nl.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Lightweight pdns-recursor Docker image\n![Docker Pulls](https://img.shields.io/docker/pulls/m4rcu5/pdns-recursor.svg) [![Build Status](https://travis-ci.org/m4rcu5nl/docker-pdns-recursor-alpine.svg?branch=master)](https://travis-ci.org/m4rcu5nl/docker-pdns-recursor-alpine) [![GitHub issues](https://img.shields.io/github/issues/m4rcu5nl/docker-pdns-recursor-alpine.svg)](https://github.com/m4rcu5nl/docker-pdns-recursor-alpine/issues)  \n\nDocker image for PowerDNS Recursor 4.1.x. Super lightweight thanks to the Alpine Linux 3.8 base image. Total image size for the current build is **27.2MB**\n- - -\n## Getting the image\nYou can either clone this repo and build the image yourself or pull it from Docker Hub. The `:latest` tag on Docker Hub is a daily automated build.\n\n```bash\n# Example command to build an image\nsudo docker image build -t pdns-recursor .\n\n# Example command to pull an image\nsudo docker image pull m4rcu5/pdns-recursor:latest\n```\n- - -\n## Using the image\n\n#### Default configuration\nThe recursor will work out of the box as long as you query it from a private network. To create a container without any additional configuration simply run:\n```bash\ndocker container run \\\n    --detach \\\n    --hostname resolver.local \\\n    --name pdns-recursor \\\n    --mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly=true \\\n    m4rcu5/pdns-recursor:latest\n```\nLet's assume the container can be reached on `172.17.0.4`. You can now query it with dig for example:\n```\ndig +tcp @172.17.0.4 google.com\n\n; \u003c\u003c\u003e\u003e DiG 9.10.3-P4-Ubuntu \u003c\u003c\u003e\u003e +tcp google.com @172.17.0.4\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 55033\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;google.com.            IN  A\n\n;; ANSWER SECTION:\ngoogle.com.     300 IN  A   216.58.211.110\n\n;; Query time: 37 msec\n;; SERVER: 172.17.0.4#53(172.17.0.4)\n;; WHEN: Thu Aug 31 23:35:44 CEST 2017\n;; MSG SIZE  rcvd: 55\n```\n\n#### Custom configuration\nIt is possible to overwrite default settings by defining them in custom `.conf` files in `/data/recursor-conf.d/`. As an example this repo contains a zone file for the localhost zone and a configuration file to tell the recursor it has authority for that zone. Let's assume this repo has been cloned to `/opt` of the container host resulting in something similar to this:  \n\n```\n/opt\n└── pdns-recursor\n    └── data\n        ├── recursor-conf.d\n        │   └── auth-zones.conf\n        ├── scripts\n        └── zones\n            └── localhost\n```\nNow this local folder can be mounted as a volume inside the container:  \n```bash\ndocker container run \\\n    --detach \\\n    --hostname resolver.local \\\n    --name pdns-recursor \\\n    --mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly=true \\\n    --mount type=bind,src=/opt/pdns-recursor/data,dst=/data,readonly=true \\\n    m4rcu5/pdns-recursor:latest\n```\nNow the recursor will look in `/data/zones/localhost` whenever it receives a query for that zone.  \n\nLet's say we also want the recursor to validate DNSSEC queries. This can be accomplished by creating a `.conf` file for it and restarting the container:\n```bash\n# Create the config file\necho 'dnssec=validate' \u003e /opt/pdns-recursor/data/recursor-conf.d/dnssec.conf\n\n# Restart the container\ndocker container restart pdns-recursor\n```\nA complete list of settings for the recursor can be found on [https://doc.powerdns.com/md/recursor/settings/](https://doc.powerdns.com/md/recursor/settings/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4rcu5nl%2Fdocker-pdns-recursor-alpine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm4rcu5nl%2Fdocker-pdns-recursor-alpine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4rcu5nl%2Fdocker-pdns-recursor-alpine/lists"}