{"id":15148374,"url":"https://github.com/davidnoyes/docker-pihole-customdns","last_synced_at":"2026-02-15T17:02:15.919Z","repository":{"id":210421551,"uuid":"726519560","full_name":"davidnoyes/docker-pihole-customdns","owner":"davidnoyes","description":"Facilitate Pi-hole DNS entry automation for Docker services efficiently with docker-pihole-customdns. Simplify the management process, ensuring seamless integration and reduced manual effort.","archived":false,"fork":false,"pushed_at":"2024-12-21T04:47:25.000Z","size":55,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T22:42:37.833Z","etag":null,"topics":["automation","dns","docker","docker-compose","docker-image","nginx","pi-hole","traefik"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidnoyes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T16:15:39.000Z","updated_at":"2024-12-20T18:49:42.000Z","dependencies_parsed_at":"2024-04-23T10:44:03.837Z","dependency_job_id":null,"html_url":"https://github.com/davidnoyes/docker-pihole-customdns","commit_stats":null,"previous_names":["davidnoyes/docker-pihole-customdns"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnoyes%2Fdocker-pihole-customdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnoyes%2Fdocker-pihole-customdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnoyes%2Fdocker-pihole-customdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidnoyes%2Fdocker-pihole-customdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidnoyes","download_url":"https://codeload.github.com/davidnoyes/docker-pihole-customdns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237910078,"owners_count":19385829,"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":["automation","dns","docker","docker-compose","docker-image","nginx","pi-hole","traefik"],"created_at":"2024-09-26T13:03:23.122Z","updated_at":"2025-10-24T03:31:41.114Z","avatar_url":"https://github.com/davidnoyes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Pi-hole Custom DNS\n\nFacilitate Pi-hole DNS entry automation for Docker services efficiently with docker-pihole-customdns. Simplify the management process, ensuring seamless integration and reduced manual effort.\n\nPerfect for use when running your services behind a proxy such as Traefik or nginx. Instead of manually adding and removing DNS entries for your self-hosted Docker applications in Pi-hole, specify the domain to use in a label on your container and let Docker Pi-hole Custom DNS create the DNS entry for you.\n\n## Supports\n\n* DNS A record management\n* DNS CNAME record management\n* Up to two Pi-hole DNS servers\n\n## Docker Image\n\n```shell\ndocker pull download.noyes.uk/davidnoyes/docker-pihole-customdns:latest\n```\n\n*(Images hosted by ghcr.io with a custom domain)*\n\n**OS / Arch**\n\n* linux/amd64\n* linux/arm/v7\n* linux/arm64\n\n## Docker Usage\n\n```shell\ndocker run --name docker-pihole-customdns -d --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock:ro -e DPC_PIHOLE_URL=http://pi.hole -e DPC_DEFAULT_TARGET_IP=198.51.100.0 -e DPC_PIHOLE_API_TOKEN=abcdefghijklmnopqrstuvwxyz\n```\n\nReplace the values for `DPC_PIHOLE_URL`, `DPC_DEFAULT_TARGET_IP` \u0026 `DPC_PIHOLE_API_TOKEN` as appropriate\n\n## Docker Label\n\nThe conatiner label to be applied to service containers is: \n\n`docker-pihole-customdns.domain=`\n\nIt can be applied in the following way:\n```shell\ndocker run -d --name nginx -l docker-pihole-customdns.domain=my-service.int.my-domain.net nginx\n```\n\n## Docker Compose\n\n```yaml\nversion: \"3.8\"\nservices:\n  docker-pihole-customdns:\n    container_name: docker-pihole-customdns\n    image: download.noyes.uk/davidnoyes/docker-pihole-customdns:latest\n    restart: unless-stopped\n    security_opt:\n      - no-new-privileges:true\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n    environment:\n      - DPC_PIHOLE_API_TOKEN=abcdefghijklmnopqrstuvwxyz\n      - DPC_DEFAULT_TARGET_IP=198.51.100.0\n      - DPC_PIHOLE_URL=http://pi.hole\n```\n\n### Environment Variables\n\n| Variable | Description |\n|-|-|\n| `DPC_PIHOLE_API_TOKEN` | Pi-hole API Token. |\n| `DPC_PIHOLE_API_TOKEN_2` | Second Pi-hole API Token (Optional)\n| `DPC_DEFAULT_TARGET_IP` | Default target IP address for the Docker host. The IP address used by the http proxy for all docker services on the host. |\n| `DPC_DEFAULT_TARGET_DOMAIN` | Default target domain address for the Docker host. The DNS address used by the http proxy for all docker services on the host. |\n| `DPC_PIHOLE_URL` | Pi-hole URL (e.g. http://pi-hole) |\n| `DPC_PIHOLE_URL_2` | Second Pi-hole URL (optional) |\n\n## Binary Usage\n\n```shell\nUsage of ./docker-pihole-customdns:\n  -apitoken string\n        Pi-hole API token\n  -apitoken2 string\n        Second Pi-hole API token (Optional)\n  -piholeurl string\n        Pi-hole URL (e.g. http://pi.hole)\n  -piholeurl2 string\n        Second Pi-hole URL (Optional e.g. http://pi.hole)\n  -targetdomain string\n        Default target domain address for the Docker host\n  -targetip string\n        Default target IP address for the Docker host\n```\n\n\n## Refrences\n\n### Pi-hole DNS API\n\nPi-hole API token can be obtained here: http://pi.hole/admin/settings.php?tab=api\n(Where `pi.hole` will resolve to your Pi-hole instance or replace with your own domain/IP address.)\n\n[CustomDNS](docs/CustomDNS.md)\n\n[CustomCNAME](docs/CustomCNAME.md)\n\n\u003cimg referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=d392e053-6689-4d55-98a0-70f0ed688db1\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidnoyes%2Fdocker-pihole-customdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidnoyes%2Fdocker-pihole-customdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidnoyes%2Fdocker-pihole-customdns/lists"}