{"id":16880567,"url":"https://github.com/squaremo/weavedns","last_synced_at":"2025-04-11T11:44:08.524Z","repository":{"id":21285152,"uuid":"24601137","full_name":"squaremo/weavedns","owner":"squaremo","description":"Moved into weave repo https://github.com/zettio/weave (was \"DNS for weave networks\")","archived":false,"fork":false,"pushed_at":"2014-10-28T17:23:31.000Z","size":370,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T08:04:22.578Z","etag":null,"topics":[],"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/squaremo.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}},"created_at":"2014-09-29T15:34:39.000Z","updated_at":"2023-11-11T17:51:14.000Z","dependencies_parsed_at":"2022-09-09T09:11:04.119Z","dependency_job_id":null,"html_url":"https://github.com/squaremo/weavedns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fweavedns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fweavedns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fweavedns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fweavedns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squaremo","download_url":"https://codeload.github.com/squaremo/weavedns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248387011,"owners_count":21095136,"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":[],"created_at":"2024-10-13T15:59:17.155Z","updated_at":"2025-04-11T11:44:08.498Z","avatar_url":"https://github.com/squaremo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weave DNS server\n\nThe Weave DNS server answers name queries in a Weave network. It is\nrun per-host, to be supplied as the nameserver for containers on that\nhost. It is then told about hostnames for the local containers. For\nother names it will ask the other weave hosts, or fall back to using\nthe host's configured name server.\n\n## Use\n\nThe Weave DNS container should be started after the Weave router --\ni.e., after running `weave launch` -- and joined to the Weave network.\n\nIn general, it should be given an IP in the same subnet as the\nrouter. To watch for container events it must have the docker socker\nmounted.\n\n```bash\n$ weave launch 10.0.0.1/16\n$ weave run 10.0.0.2/16 --name=weavedns -v /var/run/docker.sock:/var/run/docker.sock zettio/weavedns\n```\n\nThe docker IP for the container can then be provided as the `--dns` value\nfor other containers:\n\n```bash\n$ dns_ip=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' weavedns)\n$ shell1=$(weave run 10.0.1.2/24 -h shell.weave.local --dns=$dns_ip -t ubuntu /bin/bash)\n```\n\nTo associate a hostname with an IP, use an HTTP PUT to the DNS server:\n\n```bash\n$ shell1_ip=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' $shell1)\n$ curl -X PUT \"http://$dns_ip:6785/name/$shell1/10.0.1.2?fqdn=shell1.weave.local\u0026routing_prefix=24\u0026local_ip=$shell1_ip\"\n```\n\nYou should now be able to look up the name:\n\n```bash\n$ dig @$dns_ip +short shell1.weave.local\n```\n\nBy default, the server will also watch docker events and remove\nentries for any containers that die. You can tell it not to by adding\n`--watch=false` to the container args:\n\n```bash\n$ weave run 10.0.0.2/16 --name=weavedns -v /var/run/docker.sock:/var/run/docker.sock zettio/weavedns --watch=false\n```\n\n## Present limitations\n\n * The server will not know about restarted containers, unless you\n   re-PUT the name.\n * The server will forget names if it is itself restarted.\n * The server may give unreachable IPs as answers, since it\n   doesn't try to filter by subnet yet.\n * We use UDP broadcast to find out about remote names (from Weave DNS\n   servers on other hosts); this likely won't scale well beyond a\n   certain point T.B.D., so we'll have to come up with another scheme.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquaremo%2Fweavedns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquaremo%2Fweavedns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquaremo%2Fweavedns/lists"}