{"id":15638767,"url":"https://github.com/cytopia/docker-bind","last_synced_at":"2025-10-04T02:30:25.154Z","repository":{"id":21306672,"uuid":"90711563","full_name":"cytopia/docker-bind","owner":"cytopia","description":"Bind (bind9) caching DNS server on Alpine or Debian with wild-card domain support [multi-arch]","archived":false,"fork":false,"pushed_at":"2023-09-05T03:23:04.000Z","size":200,"stargazers_count":92,"open_issues_count":6,"forks_count":51,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-08T15:05:10.901Z","etag":null,"topics":["arm64","arm64-images","arm64v8","bind9","devilbox","dns","dns-server","docker","docker-bind","docker-bind9","docker-image","dockerfile","named"],"latest_commit_sha":null,"homepage":"http://devilbox.org/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cytopia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":["cytopia"],"patreon":"devilbox"}},"created_at":"2017-05-09T06:42:15.000Z","updated_at":"2025-03-30T19:56:53.000Z","dependencies_parsed_at":"2024-10-23T04:36:47.665Z","dependency_job_id":null,"html_url":"https://github.com/cytopia/docker-bind","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/cytopia/docker-bind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-bind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-bind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-bind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-bind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cytopia","download_url":"https://codeload.github.com/cytopia/docker-bind/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytopia%2Fdocker-bind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254772,"owners_count":25956676,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arm64","arm64-images","arm64v8","bind9","devilbox","dns","dns-server","docker","docker-bind","docker-bind9","docker-image","dockerfile","named"],"created_at":"2024-10-03T11:23:03.519Z","updated_at":"2025-10-04T02:30:24.865Z","avatar_url":"https://github.com/cytopia.png","language":"Shell","readme":"# Bind Docker\n\n[![Tag](https://img.shields.io/github/tag/cytopia/docker-bind.svg)](https://github.com/cytopia/docker-bind/releases)\n[![lint](https://github.com/cytopia/docker-bind/workflows/lint/badge.svg)](https://github.com/cytopia/docker-bind/actions?query=workflow%3Alint)\n[![build](https://github.com/cytopia/docker-bind/workflows/build/badge.svg)](https://github.com/cytopia/docker-bind/actions?query=workflow%3Abuild)\n[![nightly](https://github.com/cytopia/docker-bind/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-bind/actions?query=workflow%3Anightly)\n[![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT)\n\n[![Discord](https://img.shields.io/discord/1051541389256704091?color=8c9eff\u0026label=Discord\u0026logo=discord)](https://discord.gg/2wP3V6kBj4)\n[![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697\u0026label=Discourse\u0026logo=discourse)](https://devilbox.discourse.group)\n\n**Available Architectures:**  `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le`\n\n[![](https://img.shields.io/docker/pulls/cytopia/bind.svg)](https://hub.docker.com/r/cytopia/bind)\n\nBind caching DNS server based on Alpine and Debian slim with support for DNS forwarders, infinite wild-card DNS, infinite extra hosts, reverse DNS, DNSSEC timing settings and others.\n\n| Bind Project        | Reference Implementation |\n|:-------------------:|:------------------------:|\n| \u003ca title=\"Docker Bind\" href=\"https://github.com/cytopia/docker-bind\" \u003e\u003cimg height=\"82px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/06/png/banner_256_trans.png\" /\u003e\u003c/a\u003e | \u003ca title=\"Devilbox\" href=\"https://github.com/cytopia/devilbox\" \u003e\u003cimg height=\"82px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png\" /\u003e\u003c/a\u003e |\n| [Bind DNS Server](https://github.com/cytopia/docker-bind) | The [Devilbox](https://github.com/cytopia/devilbox) |\n\n\n## 🐋 Available Docker tags\n\n[![](https://img.shields.io/docker/pulls/cytopia/bind.svg)](https://hub.docker.com/r/cytopia/bind)\n\n[`latest`][tag_latest] [`stable`][tag_stable] [`alpine`][tag_alpine]\n```bash\ndocker pull cytopia/bind\n```\n\n[tag_latest]: Dockerfiles/Dockerfile.latest\n[tag_stable]: Dockerfiles/Dockerfile.stable\n[tag_alpine]: Dockerfiles/Dockerfile.alpine\n\n#### Rolling Releases\n\nThe following Docker image tags are rolling releases and are built and updated every night.\n\n[![nightly](https://github.com/cytopia/docker-bind/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-bind/actions?query=workflow%3Anightly)\n\n| Docker Tag                       | Git Ref      | Available Architectures                                                      |\n|----------------------------------|--------------|------------------------------------------------------------------------------|\n| **[`latest`][tag_latest]**       | master       | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le` |\n| [`stable`][tag_stable]           | master       | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le` |\n| [`alpine`][tag_alpine]           | master       | `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le` |\n\n#### Point in time releases\n\nThe following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date.\n\n[![build](https://github.com/cytopia/docker-bind/workflows/build/badge.svg)](https://github.com/cytopia/docker-bind/actions?query=workflow%3Abuild)\n\n| Docker Tag                       | Git Ref      | Available Architectures                                                       |\n|----------------------------------|--------------|-------------------------------------------------------------------------------|\n| **[`\u003ctag\u003e`][tag_latest]**        | git: `\u003ctag\u003e` |  `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le` |\n| [`\u003ctag\u003e-stable`][tag_stable]     | git: `\u003ctag\u003e` |  `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le` |\n| [`\u003ctag\u003e-alpine`][tag_alpine]     | git: `\u003ctag\u003e` |  `amd64`, `i386`, `arm64`, `arm/v7`, `arm/v6`, `ppc64le`, `s390x`, `mips64le` |\n\n\u003e 🛈 Where `\u003ctag\u003e` refers to the chosen git tag from this repository.\u003cbr/\u003e\n\u003e ⚠ **Warning:** The latest available git tag is also build every night and considered a rolling tag.\n\n\n----\n\n**Table of Contents**\n\n1. [Environment variables](#-environment-variables)\n    1. [Required environment variables](#required-environment-variables)\n    2. [Optional environment variables](#optional-environment-variables)\n        1. [DEBUG_ENTRYPOINT](#debug_entrypoint)\n        2. [DOCKER_LOGS](#docker_logs)\n        3. [DNS_A](#dns_a)\n        4. [DNS_CNAME](#dns_cname)\n        5. [DNS_PTR](#dns_ptr)\n        6. [DNSSEC_VALIDATE](#dnssec_validate)\n        7. [DNS_FORWARDER](#dns_forwarder)\n        8. [MAX_CACHE_SIZE](#max_cache_size)\n        9. [TTL_TIME](#ttl_time)\n        10. [REFRESH_TIME](#refresh_time)\n        11. [RETRY_TIME](#retry_time)\n        12. [EXPIRY_TIME](#expiry_time)\n        13. [MAX_CACHE_TIME](#max_cache_time)\n        14. [ALLOW_QUERY](#allow_query)\n        15. [ALLOW_RECURSION](#allow_recursion)\n2. [Volumes](#-volumes)\n3. [Exposed Ports](#-exposed-ports)\n4. [Examples](#-examples)\n    1. [Default run](#default-run)\n    2. [Wildcard domain](#wildcard-domain)\n    3. [Wildcard subdomain](#wildcard-subdomain)\n    4. [Wildcard TLD](#wildcard-tld)\n    5. [Wildcard TLD and reverse DNS entry](#wildcard-tld-and-reverse-dns-entry)\n    6. [Wildcard TLD and DNS resolver](#wildcard-tld-and-dns-resolver)\n    7. [Wildcard TLD, DNS resolver and extra hosts](#wildcard-tld-dns-resolver-and-extra-hosts)\n    8. [Extra hosts, DNS resolver, allow query, and allow recursion](#extra-hosts-dns-resolver-allow-query-and-allow-recursion)\n5. [Host integration](#-host-integration)\n6. [Sister Projects](#-sister-projects)\n7. [Community](#-community)\n8. [Articles](#-articles)\n9. [Credits](#-credits)\n10. [Maintainer](#-maintainer)\n11. [License](#-license)\n\n---\n\n## ∑ Environment Variables\n\n### Required environment variables\n\n- None\n\n### Optional environment variables\n\n| Variable           | Type   | Default   | Description |\n|--------------------|--------|-----------|-------------|\n| `DEBUG`            | bool   | `0`       | Set to `1` in order to add `set -x` to entrypoint script for bash debugging |\n| `DEBUG_ENTRYPOINT` | bool   | `0`       | Show shell commands executed during start.\u003cbr/\u003eValues: `0`, `1` or `2` |\n| `DOCKER_LOGS`      | bool   | `0`       | Set to `1` to log info and queries to Docker logs. |\n| `DNS_A`            | string |           | Comma separated list of A records (wildcard supported). |\n| `DNS_CNAME`        | string |           | Comma separated list of CNAME records (wildcard supported). |\n| `DNS_PTR`          | string |           | Comma separated list of PTR records (reverse DNS). |\n| `DNSSEC_VALIDATE`  | string | `no`      | Control the behaviour of DNSSEC validation. The default is to not validate: `no`. Other possible values are: `yes` and `auto`. |\n| `DNS_FORWARDER`    | string |           | Specify a comma separated list of IP addresses as custom DNS resolver. This is useful if your LAN already has a DNS server which adds custom/internal domains and you still want to keep them in this DNS server\u003cbr/\u003eExample: `DNS_FORWARDER=8.8.8.8,8.8.4.4` |\n| `MAX_CACHE_SIZE`   | size   | `90%`     | Amount of memory used by the server (cached results) |\n| `TTL_TIME`         | int    | `3600`    | (time in seconds) see [bind ttl](http://www.zytrax.com/books/dns/apa/ttl.html) and [bind soa](http://www.zytrax.com/books/dns/ch8/soa.html)|\n| `REFRESH_TIME`     | int    | `1200`    | (Time in seconds) See [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html) |\n| `RETRY_TIME`       | int    | `180`     | (Time in seconds) See [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html) |\n| `EXPIRY_TIME`      | int    | `1209600` | (Time in seconds) See [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html) |\n| `MAX_CACHE_TIME`   | int    | `10800`   | (Time in seconds) See [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html) |\n| `ALLOW_QUERY`      | string |           | Specify a comma separated list of IP addresses with optional CIDR mask to allow queries from a specific IP address or ranges of IP addresses. This allows for control over who is allowed to query the DNS server. If not specified all hosts are allowed to make queries (defaults to `any`). See [BIND QUERIES](http://www.zytrax.com/books/dns/ch7/queries.html) \u003cbr/\u003eExample: `ALLOW_QUERY=192.168.1.0/24,127.0.0.1` |\n| `ALLOW_RECURSION`  | string |           | Specify a comma separated list of IP addresses with optional CIDR mask to allow queries from a specific IP address or ranges of IP addresses.  This option allows this DNS server to forward a request to another DNS server when an address cannot be resolved. If not present the allow-query-cache default is assumed. See [BIND QUERIES](http://www.zytrax.com/books/dns/ch7/queries.html) \u003cbr/\u003eExample: `ALLOW_RECURSION=192.168.1.0/24,127.0.0.1` |\n#### DEBUG_ENTRYPOINT\n\n* If set to `0`, only warnings and errors are shown\n* If set to `1`, info, warnings and errors are shown\n* If set to `2`, info, warnings and errors are shown, as well as commands executed during startup\n\n#### DOCKER_LOGS\n\n* If set to `0`, no additional logging is done during run-time\n* If set to `1`, BIND is more verbose during run-time and shows asked queries as well as general information\n\n#### DNS_A\n\nThe `DNS_A` option allows you to specify one or more A records (including wildcard if required) which can either\nbe a full TLD, a domain or any kind of subdomain. It allows you to map your Domain to a specific\nIP address.\n\nThe general format is as follows:\n```bash\n# Structure\nDNS_A='tld1=1.1.1.1, tld2=2.2.2.2, *.tld3=3.3.3.3'\n```\n\nSome examples:\n```bash\n# 1. One entry:\n# The following catches all queries to *.tld (wildcard) and redirects them to 192.168.0.1\nDNS_A='*.tld=192.168.0.1'\n\n# 2. Two entries:\n# The following catches all queries to *.tld and redirects them to 192.168.0.1\n# As well as all queries from *.example.org and redirects them to 192.168.0.2\nDNS_A='*.tld=192.168.0.1, *.example.org=192.168.0.2'\n```\n\n#### DNS_CNAME\n\nThe `DNS_CNAME` option allows you to specify one or more CNAME records (including wildcard if required) which can either\nbe a full TLD, a domain or any kind of subdomain. It allows you to map your Domain to a specific\nIP address.\n\nThe general format is as follows:\n```\n# Structure\nDNS_CNAME='tld1=google.com, tld2=www.google.com, *.tld3=example.org'\n```\n\nSome examples:\n```\n# 1. Using CNAME's for resolving:\n# The following catches all queries to *.tld and redirects them to whatever\n# IP example.org resolved to\nDNS_CNAME='*.tld=example.org'\n```\n\n#### DNS_PTR\n\nThe `DNS_PTR` option allows you to specify PTR records (reverse DNS).\n\nThe general format is as follows:\n```\n# Structure\nDNS_PTR='192.168.0.1=www.google.com, 192.168.0.2=ftp.google.com'\n```\n\nSome examples:\n```\n# 1. Adding reverse DNS:\n# The following adds reverse DNS from 192.168.0.1 to resolve to tld\nDNS_PTR='192.168.0.1=tld'\n```\n\n#### DNSSEC_VALIDATE\n\nThe `DNSSEC_VALIDATE` variable defines the DNSSEC validation. Default is to not validate (`no`).\nPossible values are:\n\n* `yes` - DNSSEC validation is enabled, but a trust anchor must be manually configured. No validation will actually take place.\n* `no` - DNSSEC validation is disabled, and recursive server will behave in the \"old fashioned\" way of performing insecure DNS lookups, until you have manually configured at least one trusted key.\n* `auto` - DNSSEC validation is enabled, and a default trust anchor (included as part of BIND) for the DNS root zone is used.\n\n#### DNS_FORWARDER\n\nBy default this dockerized BIND is not acting as a DNS forwarder, so it will not have any external\nDNS available. In order to apply external DNS forwarding, you will have to specify one or more external\nDNS server. This could be the one's from google for example (`8.8.8.8` and `8.8.4.4`) or any others\nyou prefer. In case your LAN has its own DNS server with already defined custom DNS records that you\nneed to make available, you should use them.\n\n```bash\n# Structure (comma separated list of IP addresses)\nDNS_FORWARDER='8.8.8.8,8.8.4.4'\n```\n\nSome examples\n```bash\nDNS_FORWARDER='8.8.8.8'\nDNS_FORWARDER='8.8.8.8,192.168.0.10'\n```\n#### MAX_CACHE_SIZE\nThe amount of RAM used by the server to store results. You can use relative (percent) or absolute (bytes) values.\nExamples:\n* `MAX_CACHE_SIZE=30%` (Use 30% of the systems memory)\n* `MAX_CACHE_SIZE=512M` (Use 512 Megabytes)\n* `MAX_CACHE_SIZE=2G` (Use 2 Gigabytes)\n\n#### TTL_TIME\nSpecify time in seconds.\nFor more information regarding this setting, see [BIND TTL](http://www.zytrax.com/books/dns/apa/ttl.html) and [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html)\n\n#### REFRESH_TIME\nSpecify time in seconds.\nFor more information regarding this setting, see [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html)\n\n#### RETRY_TIME\nSpecify time in seconds.\nFor more information regarding this setting, see [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html)\n\n#### EXPIRY_TIME\nSpecify time in seconds.\nFor more information regarding this setting, see [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html)\n\n#### MAX_CACHE_TIME\nSpecify time in seconds.\nFor more information regarding this setting, see [BIND SOA](http://www.zytrax.com/books/dns/ch8/soa.html)\n\n#### ALLOW_QUERY\n\nBy default this dockerized BIND does not specify query rules.  This exposes the\nallow-query options to specify who is allowed to query for results.\nNote that ACLs are not yet handled.\n\n```bash\n# Structure (comma separated list of IP addresses, IP addresses with CIDR mask, or address match list names \"none\", \"any\", \"localhost\", and \"localnets\")\nALLOW_QUERY='192.168.1.0/24,127.0.0.1'\n```\n\nSome examples\n```bash\nALLOW_QUERY='any'\nALLOW_QUERY='192.168.1.0/24,127.0.0.1'\n```\n\n#### ALLOW_RECURSION\n\nBy default this dockerized BIND does not allow DNS recursion. If BIND cannot resolve an address it\nwill act as a DNS client and forward the request to another DNS server.  This server is specified in the DNS_FORWARDER list.\nNote that ACLs are not yet handled.\n\n```bash\n# Structure (comma separated list of IP addresses, IP addresses with CIDR mask, or address match list names \"none\", \"any\", \"localhost\", and \"localnets\")\nALLOW_RECURSION='192.168.1.0/24,127.0.0.1'\n```\n\nSome examples\n```bash\nALLOW_RECURSION='any'\nALLOW_RECURSION='192.168.1.0/24,127.0.0.1'\n```\n\n## 📂 Volumes\n\n- None\n\n\n## 🖧 Exposed Ports\n\n| Docker | Description  |\n|--------|--------------|\n| 53     | DNS Resolver |\n| 53/udp | DNS Resolver |\n\n\n## 💡 Examples\n\nThe following examples start the container in foreground and use `-i`, so you can easily stop\nit by pressing `\u003cCtrl\u003e + c`. For a production run, you would rather use `-d` to send it to the\nbackground.\n\n#### Default run\n\nExposing the port is mandatory if you want to use it for your host operating system.\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -t cytopia/bind\n```\n\n#### Wildcard domain\n\nLet's add a wildcard zone for `*.example.com`. All subdomains (but not example.com itself) will resolve\nto `192.168.0.1`.\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='*.example.com=192.168.0.1' \\\n    -t cytopia/bind\n```\n\n#### Wildcard subdomain\n\nLet's add a wildcard zone for `*.aws.example.com`. All subdomains (but not aws.example.com itself) will resolve\nto `192.168.0.1`.\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='*.aws.example.com=192.168.0.1' \\\n    -t cytopia/bind\n```\n\n#### Wildcard TLD\n\nLet's add a wildcard zone for `*.loc`. All domains, subdomain (but not loc itself) will resolve\nto `192.168.0.4`.\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='*.loc=192.168.0.4' \\\n    -t cytopia/bind\n```\n\n#### Wildcard TLD and reverse DNS entry\n\nLet's add a wildcard zone for `*.loc`, and an A record for loc. All domains, subdomain and loc itself will resolve\nto `192.168.0.4`. Additionally we specify that `host.loc` will be the reverse loopup for `192.168.0.4`.\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='*.loc=192.168.0.4, loc=192.168.0.4' \\\n    -e DNS_PTR='192.168.0.4=host.loc' \\\n    -t cytopia/bind\n```\n\n#### Wildcard TLD and DNS resolver\n\nLet's add a wildcard zone for `*.loc`. All its domains (but not the domain itself) will resolve\nto `192.168.0.4`.\n\nLet's also hook in our imaginary corporate DNS server into this container, so we can make use of\nany already defined custom DNS entries by that nameserver.\n\n* `loc` and all its subdomains (such as: `hostname.loc`) will point to `192.168.0.1`:\n* Your corporate DNS servers are `10.0.15.1` and `10.0.15.2`\n\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='*.loc=192.168.0.1' \\\n    -e DNS_FORWARDER=10.0.15.1,10.0.15.2 \\\n    -t cytopia/bind\n```\n\n#### Wildcard TLD, DNS resolver and extra hosts\n\n* All subdomains of `loc` (but not `loc` itself) will point to `192.168.0.1`\n* Your corporate DNS servers are `10.0.15.1` and `10.0.15.2`\n* Also add two additional hosts with A and PTR records:\n    - host5.loc -\u003e 192.168.0.2\n    - host5.org -\u003e 192.168.0.3\n\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='*.loc=192.168.0.1, host5.loc=192.168.0.2, host5.org=192.168.0.3' \\\n    -e DNS_PTR='192.168.0.2=host5.loc, 192.168.0.3=host5.org' \\\n    -e DNS_FORWARDER=10.0.15.1,10.0.15.2 \\\n    -t cytopia/bind\n```\n\n#### Extra hosts, DNS resolver, allow query, and allow recursion\n\n* Your trusted external DNS servers are `8.8.8.8` and `8.8.4.4` (google DNS servers)\n* Allow queries from:\n    - All 192.168.0.xxx addresses\n    - Localhost aka 127.0.0.1\n* Allow recursion to resolve other queries (such as www.google.com) from:\n    - All 192.168.0.xxx addresses\n    - Localhost aka 127.0.0.1\n* Add an extra hosts with custom DNS:\n    - host1 -\u003e 192.168.0.11\n\n```bash\ndocker run -i \\\n    -p 53:53/tcp \\\n    -p 53:53/udp \\\n    -e DNS_A='host1=192.168.0.11' \\\n    -e DNS_FORWARDER=8.8.8.8,8.8.4.4 \\\n    -e ALLOW_QUERY=192.168.0.0/24,127.0.0.1 \\\n    -e ALLOW_RECURSION=192.168.0.0/24,127.0.0.1 \\\n    -t cytopia/bind\n```\n\n## 🔧 Host integration\n\nYou can run this DNS container locally without having to worry to affect any corporate DNS server\nthat are given to you via DHCP.\n\nAdd the following line to the very beginning to `/etc/dhcp/dhclient.conf`:\n```bash\nprepend domain-name-servers 127.0.0.1;\n```\nRestart network manager\n```bash\n# Via service command\nsudo service network-manager restart\n\n# Or the systemd way\nsudo systemctl restart network-manager\n```\n\nThis will make sure that whenever your `/etc/resolv.conf` is deployed, you will have `127.0.0.1`\nas the first entry and also make use of any other DNS server which are deployed via the LAN's DHCP server.\n\nIf `cytopia/bind` is not running, it does not affect the name resolution, because you will still\nhave entries in `/etc/resolv.conf`.\n\n\n## 🖤 Sister Projects\n\nShow some love for the following sister projects.\n\n\u003ctable\u003e\n \u003ctr\u003e\n  \u003cth\u003e🖤 Project\u003c/th\u003e\n  \u003cth\u003e🐱 GitHub\u003c/th\u003e\n  \u003cth\u003e🐋 DockerHub\u003c/th\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca title=\"Devilbox\" href=\"https://github.com/cytopia/devilbox\" \u003e\u003cimg width=\"256px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png\" /\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://github.com/cytopia/devilbox\"\u003e\u003ccode\u003eDevilbox\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca title=\"Docker PHP-FMP\" href=\"https://github.com/devilbox/docker-php-fpm\" \u003e\u003cimg width=\"256px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/02/png/banner_256_trans.png\" /\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://github.com/devilbox/docker-php-fpm\"\u003e\u003ccode\u003edocker-php-fpm\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://hub.docker.com/r/devilbox/php-fpm\"\u003e\u003ccode\u003edevilbox/php-fpm\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca title=\"Docker PHP-FMP-Community\" href=\"https://github.com/devilbox/docker-php-fpm-community\" \u003e\u003cimg width=\"256px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/03/png/banner_256_trans.png\" /\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://github.com/devilbox/docker-php-fpm-community\"\u003e\u003ccode\u003edocker-php-fpm-community\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://hub.docker.com/r/devilbox/php-fpm-community\"\u003e\u003ccode\u003edevilbox/php-fpm-community\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca title=\"Docker MySQL\" href=\"https://github.com/devilbox/docker-mysql\" \u003e\u003cimg width=\"256px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/04/png/banner_256_trans.png\" /\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://github.com/devilbox/docker-mysql\"\u003e\u003ccode\u003edocker-mysql\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://hub.docker.com/r/devilbox/mysql\"\u003e\u003ccode\u003edevilbox/mysql\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003cimg width=\"256px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/05/png/banner_256_trans.png\" /\u003e\u003c/td\u003e\n  \u003ctd\u003e\n   \u003ca href=\"https://github.com/devilbox/docker-apache-2.2\"\u003e\u003ccode\u003edocker-apache-2.2\u003c/code\u003e\u003c/a\u003e\u003cbr/\u003e\n   \u003ca href=\"https://github.com/devilbox/docker-apache-2.4\"\u003e\u003ccode\u003edocker-apache-2.4\u003c/code\u003e\u003c/a\u003e\u003cbr/\u003e\n   \u003ca href=\"https://github.com/devilbox/docker-nginx-stable\"\u003e\u003ccode\u003edocker-nginx-stable\u003c/code\u003e\u003c/a\u003e\u003cbr/\u003e\n   \u003ca href=\"https://github.com/devilbox/docker-nginx-mainline\"\u003e\u003ccode\u003edocker-nginx-mainline\u003c/code\u003e\u003c/a\u003e\n  \u003c/td\u003e\n  \u003ctd\u003e\n   \u003ca href=\"https://hub.docker.com/r/devilbox/apache-2.2\"\u003e\u003ccode\u003edevilbox/apache-2.2\u003c/code\u003e\u003c/a\u003e\u003cbr/\u003e\n   \u003ca href=\"https://hub.docker.com/r/devilbox/apache-2.4\"\u003e\u003ccode\u003edevilbox/apache-2.4\u003c/code\u003e\u003c/a\u003e\u003cbr/\u003e\n   \u003ca href=\"https://hub.docker.com/r/devilbox/nginx-stable\"\u003e\u003ccode\u003edevilbox/nginx-stable\u003c/code\u003e\u003c/a\u003e\u003cbr/\u003e\n   \u003ca href=\"https://hub.docker.com/r/devilbox/nginx-mainline\"\u003e\u003ccode\u003edevilbox/nginx-mainline\u003c/code\u003e\u003c/a\u003e\n  \u003c/td\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\u003ca title=\"Bind DNS Server\" href=\"https://github.com/cytopia/docker-bind\" \u003e\u003cimg width=\"256px\" src=\"https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/06/png/banner_256_trans.png\" /\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://github.com/cytopia/docker-bind\"\u003e\u003ccode\u003edocker-bind\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca href=\"https://hub.docker.com/r/cytopia/bind\"\u003e\u003ccode\u003ecytopia/bind\u003c/code\u003e\u003c/a\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## 👫 Community\n\nIn case you seek help, go and visit the community pages.\n\n\u003ctable width=\"100%\" style=\"width:100%; display:table;\"\u003e\n \u003cthead\u003e\n  \u003ctr\u003e\n   \u003cth width=\"33%\" style=\"width:33%;\"\u003e\u003ch3\u003e\u003ca target=\"_blank\" href=\"https://devilbox.readthedocs.io\"\u003e📘 Documentation\u003c/a\u003e\u003c/h3\u003e\u003c/th\u003e\n   \u003cth width=\"33%\" style=\"width:33%;\"\u003e\u003ch3\u003e\u003ca target=\"_blank\" href=\"https://discord.gg/2wP3V6kBj4\"\u003e🎮 Discord\u003c/a\u003e\u003c/h3\u003e\u003c/th\u003e\n   \u003cth width=\"33%\" style=\"width:33%;\"\u003e\u003ch3\u003e\u003ca target=\"_blank\" href=\"https://devilbox.discourse.group\"\u003e🗪 Forum\u003c/a\u003e\u003c/h3\u003e\u003c/th\u003e\n  \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody style=\"vertical-align: middle; text-align: center;\"\u003e\n  \u003ctr\u003e\n   \u003ctd\u003e\n    \u003ca target=\"_blank\" href=\"https://devilbox.readthedocs.io\"\u003e\n     \u003cimg title=\"Documentation\" name=\"Documentation\" src=\"https://raw.githubusercontent.com/cytopia/icons/master/400x400/readthedocs.png\" /\u003e\n    \u003c/a\u003e\n   \u003c/td\u003e\n   \u003ctd\u003e\n    \u003ca target=\"_blank\" href=\"https://discord.gg/2wP3V6kBj4\"\u003e\n     \u003cimg title=\"Chat on Discord\" name=\"Chat on Discord\" src=\"https://raw.githubusercontent.com/cytopia/icons/master/400x400/discord.png\" /\u003e\n    \u003c/a\u003e\n   \u003c/td\u003e\n   \u003ctd\u003e\n    \u003ca target=\"_blank\" href=\"https://devilbox.discourse.group\"\u003e\n     \u003cimg title=\"Devilbox Forums\" name=\"Forum\" src=\"https://raw.githubusercontent.com/cytopia/icons/master/400x400/discourse.png\" /\u003e\n    \u003c/a\u003e\n   \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n  \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://devilbox.readthedocs.io\"\u003edevilbox.readthedocs.io\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://discord.gg/2wP3V6kBj4\"\u003ediscord/devilbox\u003c/a\u003e\u003c/td\u003e\n  \u003ctd\u003e\u003ca target=\"_blank\" href=\"https://devilbox.discourse.group\"\u003edevilbox.discourse.group\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## 📜 Articles\n\n* [Serving Bind DNS in Kubernetes](https://medium.com/swlh/serving-bind-dns-in-kubernetes-8639fce37448)\n\n\n## ❤️ Credits\n\nThanks for contributing 🖤\n\n- **[@atomicbaum1](https://github.com/atomicbaum1)**\n- **[@ericp-mrel](https://github.com/ericp-mrel)**\n- **[@Zighy](https://github.com/Zighy)**\n\n\n## 🧘 Maintainer\n\n**[@cytopia](https://github.com/cytopia)**\n\nI try to keep up with literally **over 100 projects** besides a full-time job.\nIf my work is making your life easier, consider contributing. 🖤\n\n* [GitHub Sponsorship](https://github.com/sponsors/cytopia)\n* [Patreon](https://www.patreon.com/devilbox)\n* [Open Collective](https://opencollective.com/devilbox)\n\n**Findme:**\n**🐱** [cytopia](https://github.com/cytopia) / [devilbox](https://github.com/devilbox) |\n**🐋** [cytopia](https://hub.docker.com/r/cytopia/) / [devilbox](https://hub.docker.com/r/devilbox/) |\n**🐦** [everythingcli](https://twitter.com/everythingcli) / [devilbox](https://twitter.com/devilbox) |\n**📖** [everythingcli.org](http://www.everythingcli.org/)\n\n**Contrib:** PyPI: [cytopia](https://pypi.org/user/cytopia/) **·**\nTerraform: [cytopia](https://registry.terraform.io/namespaces/cytopia) **·**\nAnsible: [cytopia](https://galaxy.ansible.com/cytopia)\n\n\n## 🗎 License\n\n**[MIT License](LICENSE.md)**\n\nCopyright (c) 2022 [cytopia](https://github.com/cytopia)\n","funding_links":["https://github.com/sponsors/cytopia","https://patreon.com/devilbox","https://www.patreon.com/devilbox","https://opencollective.com/devilbox"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytopia%2Fdocker-bind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcytopia%2Fdocker-bind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytopia%2Fdocker-bind/lists"}