{"id":16272320,"url":"https://github.com/ventz/docker-bind","last_synced_at":"2025-10-08T20:19:41.332Z","repository":{"id":70234179,"uuid":"49385128","full_name":"ventz/docker-bind","owner":"ventz","description":"Docker Hub ventz/bind - Secure ISC BIND (Authoritative, Recursive, Slave, RPZ) - Docker image always latest built!","archived":false,"fork":false,"pushed_at":"2024-07-29T19:23:02.000Z","size":35,"stargazers_count":34,"open_issues_count":4,"forks_count":39,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-08T20:19:40.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/ventz/bind/","language":"Dockerfile","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/ventz.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-10T20:56:40.000Z","updated_at":"2024-08-29T00:24:40.000Z","dependencies_parsed_at":"2024-11-05T02:40:47.438Z","dependency_job_id":"cce2469b-13b4-405a-b7de-f816d5286324","html_url":"https://github.com/ventz/docker-bind","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ventz/docker-bind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventz%2Fdocker-bind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventz%2Fdocker-bind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventz%2Fdocker-bind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventz%2Fdocker-bind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ventz","download_url":"https://codeload.github.com/ventz/docker-bind/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ventz%2Fdocker-bind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000662,"owners_count":26082817,"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-08T02:00:06.501Z","response_time":56,"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":[],"created_at":"2024-10-10T18:17:17.232Z","updated_at":"2025-10-08T20:19:41.316Z","avatar_url":"https://github.com/ventz.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"### ISC BIND9 Container (Stable: 9.18.27_xx) built on top of Alpine\n### Last update: 7-29-24\n### Latest Stable Docker Tag: 9.18.27-r0\n\nNOTE: \"Last Update\" is the date of the latest DockerHub build.\n\nThis container is a super small (~5MB compressed pull, and only ~9MB\nwhen extracted) FULL version of ISC BIND9.\n\nIt is ideal for an extremely secure and fast master (authoritative server),\nslave, recursive server/resolver, RPZ \"dns firewall\", or just\nabout any other purpose you can use bind for.\n\nTo get started quickly, skip to step \"D\".\n\n# (A.) Security - always on the latest stable BIND release!\nThis container will _always_ be up to date on the latest\nstable+patched version, usually within 24 hours of it being available\nin Alpine. In fact, most of the BIND vulnerabilities so far have been\nreported by me to the Alpine developers.\n\n# (B.) How to deploy a Bind (DNS) server?\nThis container contains everything needed in terms of configuration to\nrun as an authoritative server or a recursive resolver/forwarding cacher.\n\nHowever, the default config permits queries and recursion only from 127.0.0.1 - which will not be too useful :)\nBut the assumption is that you will override ```/etc/bind``` with your configs, and ```/var/cache/bind``` with your zones.\n\n# (C.) Required \"DATA\" directory - for configs and zone data:\nThis container assumes you have a \"/DATA\" folder with with your container specific data.\n(You can change that folder, sub-folders, and file points as needed, but make sure you update the \"-v\" mounts for the run.)\n\nSpecifically, you need to have these directories/paths:\n```\n1.) [ *REQUIRED* ]\nIn your \"/DATA/etc/bind\" directory, a file \"named.conf\", which acts as an entry point to your configs\nTake a look at the default config, and the example configs provided\n\n2.) [ *REQUIRED* ]\nA \"/DATA/var/cache/bind\" directory for all of the master or slave zones. If it's for slave zones, it will populate automatically and you can leave it blank.\n```\n\n\n# (D.) How to run a BIND (\"named\") Docker Container?\n\n## Default Example:\nThis is just to test it out - by default only allows queries from\nitself (127.0.0.1) -- pretty useless for real world usage\n```\ndocker run --name=dns-test\n-it -d \\\n--dns=8.8.8.8 --dns=8.8.4.4 \\\n-p 53:53/udp -p 53:53 \\\nventz/bind\n```\n\n## Customer Override Example for Authoritative Master\nEdit: named.conf.local with your forward zone at least\nand create the file in /var/cache/bind/$yourdomain.tld\n```\ndocker run --name=dns-master\n-it -d \\\n--dns=8.8.8.8 --dns=8.8.4.4 \\\n-p 53:53/udp -p 53:53 \\\n-v /DATA/etc/bind:/etc/bind \\\n-v /DATA/var/cache/bind:/var/cache/bind \\\nventz/bind\n```\n\n## Custom Override Example for Recursive Resolver/Cacher:\nEdit: named.conf.options -\u003e change the \"allow-recursion\" and  \"allow-query\" with your subnets\n```\ndocker run --name=dns-resolver\n-it -d \\\n--dns=8.8.8.8 --dns=8.8.4.4 \\\n-p 53:53/udp -p 53:53 \\\n-v /DATA/etc/bind:/etc/bind \\\n-v /DATA/var/cache/bind:/var/cache/bind \\\nventz/bind\n```\n\nAdditional options may be passed to the bind daemon via the `OPTIONS` argument, provided as:\n`docker run --env OPTIONS='...'\n\n# (E.) FAQs\n\n## How do I generate an RNDC Key?\n```\ndocker run -it --rm --entrypoint \"/usr/sbin/rndc-confgen\" ventz/bind\n```\n\nTake the portion that looks like this and save to \"/etc/bind/rndc.key\":\n```\n# Start of rndc.conf\nkey \"rndc-key\" {\n    algorithm hmac-sha256;\n    # Note: the secret will be different, this is just an example\n    secret \"zjVC59ehGxbbB6OhYhGaqUTIXu8Imcg3VKzvoMwIMzY=\";\n};\n```\n\n## What configuration files do I need to get started?\n\nI highly recommend reading more about bind if this is your question. Here are some useful resources:\n\n* https://www.bind9.net/manuals\n* https://wiki.debian.org/Bind9\n* https://help.ubuntu.com/community/BIND9ServerHowto\n* https://www.zytrax.com/books/dns/ch7/\n* https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-ubuntu-18-04\n\nThat said, as a bare minimum (and depending on what you want - recursive, authoritative, etc), you need:\n\n[note: all of these are provided in `container/configs` folder]\n\n1.) Main config: `/etc/bind/named.conf`\n\n2.) Options: `/etc/bind/named.conf.options` (note: sane and secure defaults for recursive! If for authoritative, turn off recursive at least!)\n\n3.) Local zones: `/etc/bind/named.conf.local` (for your zone configs if authoritative/slave/etc)\n\n4.) Optional: `/etc/bind/named.conf.rfc1918` (for your RFC1918 \"private IP\" zone definitions - this is optional, and while recommended, you may comment out the last line in `named.conf.local` that utilizes it)\n\n5.) Optional: `/etc/bind/default-zones` (folder for rfc1918 definitions - not needed if `named.conf.rfc1918` is not used)\n\n## How do I log everything:\n\n1.) Add to your `named.conf`:\n```\n...\ninclude \"/etc/bind/named.conf.logging\";\n...\n```\n\nand\n\n2.) Create a file `named.conf.logging` with:\n```\nlogging {\n    channel stdout {\n        stderr;\n        severity info;\n        print-category no;\n        print-severity no;\n        print-time yes;\n    };\n\t# Customize categories as needed\n    # To log everything, keep at least \"default\"\n    category security { stdout; };\n    category queries  { stdout; };\n    category dnssec   { stdout; };\n    category xfer-in  { stdout; };\n    category xfer-out { stdout; };\n    category default  { stdout; };\n};\n\nFor more information, see: https://www.slideshare.net/MenandMice/bind-9-logging-best-practices\n\n## How do I just change Bind STDERR to STDOUT logging?\n\nThere is now a \"BIND_LOG\" ENV (environment) variable for logging\n\nEnvironment variables can both have a default and be customized at run time. \n\n```\n\"-g\" = (default) Run the server in the foreground and force all logging stderr.\n\"-f\" = Run the server in the foreground\n```\n\nBy default, the \"-g\" value is set, as that logs all to STDERR.\nYou can now override it with \"-f\" by passing `-e \"BIND_LOG=-f\"` to `docker run`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventz%2Fdocker-bind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fventz%2Fdocker-bind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fventz%2Fdocker-bind/lists"}