{"id":18354055,"url":"https://github.com/arnested/ldddns","last_synced_at":"2026-02-09T23:13:11.311Z","repository":{"id":38848712,"uuid":"324787955","full_name":"arnested/ldddns","owner":"arnested","description":"Local Docker Development DNS","archived":false,"fork":false,"pushed_at":"2025-03-28T21:17:21.000Z","size":10339,"stargazers_count":19,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T22:23:33.728Z","etag":null,"topics":["debian-packages","developer-tools","dns","dns-sd","docker","hacktoberfest","multicast-dns","systemd-service"],"latest_commit_sha":null,"homepage":"https://ldddns.arnested.dk/","language":"Go","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/arnested.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-27T15:14:00.000Z","updated_at":"2025-03-28T21:12:35.000Z","dependencies_parsed_at":"2023-10-10T21:24:42.331Z","dependency_job_id":"2635d16f-8ff1-487e-ae67-673dd81209ec","html_url":"https://github.com/arnested/ldddns","commit_stats":null,"previous_names":[],"tags_count":429,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fldddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fldddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fldddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fldddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnested","download_url":"https://codeload.github.com/arnested/ldddns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247484312,"owners_count":20946384,"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":["debian-packages","developer-tools","dns","dns-sd","docker","hacktoberfest","multicast-dns","systemd-service"],"created_at":"2024-11-05T21:43:56.063Z","updated_at":"2026-01-08T20:14:31.956Z","avatar_url":"https://github.com/arnested.png","language":"Go","readme":"# Local Docker Development DNS\n\nA systemd service that will monitor your Docker host and provide\nDNS names for the containers.\n\nThe service broadcasts the domain names using multicast DNS\n(a.k.a. mDNS, zeroconf, Bonjour, Avahi).\n\nA limitation of this is that domains name can only be on the `.local`\nTLD and only have one level below the TLD. A benefit is that you don't\nhave to change your DNS server or configure stuff in `/etc/resolv` or\nsimilar.\n\nIf the containers also have exposed ports (and the ports can be looked\nup in `/etc/services`) the service will also broadcast the\nservice/domain for service discovery. I.e., `_https._tcp.` for\n\u003chttps://my-example.local\u003e (a.k.a. DNS-SD). Only _one_ domain name can\nbe broadcast per service per container.\n\nPer default domain names will be generated from the `VIRTUAL_HOST`\nenvironment variable is present (several hostnames can be separated by\nspace or comma) and from the container name.\n\nIf the hostnames do not fulfill the rule of being on the `.local` TLD\nand have only one level below the service will rewrite it.\nI.e. `my.example.com` will be rewritten to `my-example.local`.\n\n## Configuration\n\nYou can configure where the service should look for hostnames:\n\n* Environment variables (configured with `env:\u003cVAR_NAME\u003e`) - several\n  hostnames can be separated by spaces or commas.\n* Container name (configured with `containerName`) - the container\n  name will never be a valid hostname to begin with, but as mentioned\n  the `ldddns` will rewrite it into one.\n* Labels (configured with `label:\u003clabel.name\u003e`) - several hostnames\n  can be separated by spaces or commas.\n\nYou configure it be setting the environment variable\n`LDDDNS_HOSTNAME_LOOKUP` in a systemd unit override file.\n\nFor example, you could create a file named\n`/etc/systemd/system/ldddns.service.d/override.conf` with the content:\n\n```ini\n[Service]\nEnvironment=LDDDNS_HOSTNAME_LOOKUP=env:VIRTUAL_HOST,label:org.example.my.hostname,env:OTHER_VAR,containerName\n```\n\nThis will create a hostname for all hostnames in the `VIRTUAL_HOST`\nenvironment variable, the `org.example.my.hostname` label, the\n`OTHER_VAR` environment variable, and the container name.\n\nThe first hostname found will be broadcast as a DNS-SD service.\n\nContainers started with `docker-compose run` are ignored by\ndefault. You can included them by setting the environment variable\n`LDDDNS_IGNORE_DOCKER_COMPOSE_ONEOFF` to `false`.\n\nThe default configuration is the equivalent of setting:\n\n```ini\n[Service]\nEnvironment=LDDDNS_HOSTNAME_LOOKUP=env:VIRTUAL_HOST,containerName\nEnvironment=LDDDNS_IGNORE_DOCKER_COMPOSE_ONEOFF=true\n```\n\n## Install\n\nFor Pop!_OS, Ubuntu, Debian and the like, download the `.deb` package\nfile from the [latest\nrelease](https://github.com/arnested/ldddns/releases/latest) and open\nit or run:\n\n```console\nsudo dpkg -i ldddns_1.0.0_linux_amd64.deb\n```\n\nOr just run the following command which will download and install the\nlatest package for you:\n\n```console\ncurl -fsSL https://ldddns.arnested.dk/install.sh | bash\n```\n\nFor other distributions download the binary from the [latest\nrelease](https://github.com/arnested/ldddns/releases/latest) and\ncreate a systemd service unit file yourself based on\n[`ldddns.service`](https://github.com/arnested/ldddns/blob/main/systemd/ldddns.service).\n\n### Updates\n\nWhen you install the package it will add an APT source list so, you\nwill receive future updates to `ldddns` along with your other system\nupdates.\n\n## Keeping an eye on things\n\nYou can get the status of the service by running:\n\n```console\nsudo systemctl status ldddns.service\n● ldddns.service - Local Docker Development DNS\n     Loaded: loaded (/lib/systemd/system/ldddns.service; enabled; vendor preset: enabled)\n     Active: active (running) since Mon 2022-01-03 09:13:14 CET; 5 days ago\n       Docs: https://ldddns.arnested.dk\n   Main PID: 5414 (ldddns)\n     Status: \"v1.0.13; {\"HostnameLookup\":[\"env:VIRTUAL_HOST\",\"containerName\"],\"IgnoreDockerComposeOneoff\":true}\"\n      Tasks: 14 (limit: 47870)\n     Memory: 13.7M\n        CPU: 6.243s\n     CGroup: /system.slice/ldddns.service\n             └─5414 /usr/libexec/ldddns start\n\njan 07 12:46:11 pop-os systemd[1]: Starting Local Docker Development DNS...\njan 07 12:46:11 pop-os ldddns[5414]: Starting ldddns v1.0.13...\njan 07 12:46:11 pop-os systemd[1]: Started Local Docker Development DNS.\njan 07 12:46:11 pop-os ldddns[5414]: Rewrote hostname from \"my.example.com\" to \"my-example.local\"\njan 07 12:46:11 pop-os ldddns[5414]: added address for \"my-example.local\" pointing to \"172.18.0.2\"\njan 07 12:46:11 pop-os ldddns[5414]: added service \"_https._tcp\" pointing to \"my-example.local\"\n```\n\nOr follow the log with:\n\n```console\nsudo journalctl --follow --unit ldddns.service\n```\n\n## Bugs, thoughts, and comments\n\nBugs, thoughts, and comments are welcome.\n\nFeel free to get in touch at [GitHub\nIssues](https://github.com/arnested/ldddns/issues) and [GitHub\nDiscussions](https://github.com/arnested/ldddns/discussions).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnested%2Fldddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnested%2Fldddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnested%2Fldddns/lists"}