{"id":17881678,"url":"https://github.com/mischief/anchor","last_synced_at":"2025-04-03T01:41:42.125Z","repository":{"id":145388571,"uuid":"39332447","full_name":"mischief/anchor","owner":"mischief","description":null,"archived":false,"fork":false,"pushed_at":"2015-07-20T22:35:22.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T15:47:08.056Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mischief.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}},"created_at":"2015-07-19T12:07:54.000Z","updated_at":"2016-02-25T21:04:19.000Z","dependencies_parsed_at":"2023-04-01T06:20:22.060Z","dependency_job_id":null,"html_url":"https://github.com/mischief/anchor","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/mischief%2Fanchor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischief%2Fanchor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischief%2Fanchor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischief%2Fanchor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mischief","download_url":"https://codeload.github.com/mischief/anchor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922238,"owners_count":20855343,"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-28T12:38:06.944Z","updated_at":"2025-04-03T01:41:42.108Z","avatar_url":"https://github.com/mischief.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ANCHOR\n\n*anchor* manages dns records for docker containers.\n\ninspired by [skydock](https://github.com/crosbymichael/skydock).\n\n## requirements\n\n* [docker](https://github.com/docker/docker)\n* [etcd](https://github.com/coreos/etcd)\n* [skydns](https://github.com/skynetservices/skydns)\n\n## not required but nice to have\n\n* [systemd](https://github.com/systemd/systemd)\n\n## example\n\n## running\n\n### [CoreOS](https://coreos.com)\n*anchor* is pretty useful on coreos with flannel.\n\nfirst get skydns running. an example systemd unit is at [skydns.service](systemd/coreos/skydns.service).\n\nto use anchor on a coreos cluster, download [anchor.service](systemd/coreos/anchor.service)\nand run\n\n\tfleetctl start anchor.service\n\nyou should also enable use of the dns server in systemd-resolved, so edit\n`/etc/systemd/resolved.conf` and add the LAN ip of the coreos host to the `DNS=` key.\n\nfor example, if 10.0.0.10 is the LAN ip of the CoreOS host:\n\n```\n[Resolve]\nDNS=10.0.0.10\n```\n\n### dev environment\n*anchor* is handy to run in your dev environment too.\n\nit is assumed you have systemd and that your user is in the docker group.\n\nplace [etcd2.service](systemd/user/etcd2.service), [skydns.service](systemd/user/skydns.service), [anchor.service](systemd/user/anchor.service) in\n`~/.config/systemd/user/` and run\n\n\tsystemctl --user daemon-reload\n\tsystemctl --user start anchor.service\n\nthen add the docker bridge ip (e.g. 172.17.42.1) to your list of dns servers, e.g. in `/etc/resolv.conf.head`.\n\n### using it\n\nrun a few servers and give them a moment to register in skydns:\n\n\tdocker run --name apache1 -d coreos/apache /usr/sbin/apache2ctl -D FOREGROUND\n\tdocker run --name apache2 -d coreos/apache /usr/sbin/apache2ctl -D FOREGROUND\n\tdocker run --name apache3 -d coreos/apache /usr/sbin/apache2ctl -D FOREGROUND\n\nnow resolve their addresses:\n\n\tdig @172.17.42.1 apache.dev.skydns.local\n\nand you will see something like...\n\n\t;; ANSWER SECTION:\n\tapache.dev.skydns.local. 8      IN      A       172.17.0.20\n\tapache.dev.skydns.local. 8      IN      A       172.17.0.19\n\tapache.dev.skydns.local. 8      IN      A       172.17.0.21\n\nhooray!\n\nif you are on CoreOS, you can try `curl -v http://apache.dev.skydns.local/` to test apache httpd.\nin a dev environment, visit http://apache.dev.skydns.local/ in your browser.\n\ncleanup the docker containers:\n\n\tdocker rm -f apache1 apache2 apache3\n\nnotice that they have been unregistered by *anchor*:\n\n\t$ dig @127.0.0.1 apache.dev.skydns.local +short\n\t$\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischief%2Fanchor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmischief%2Fanchor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischief%2Fanchor/lists"}