{"id":22820642,"url":"https://github.com/containers/dnsname","last_synced_at":"2025-10-21T13:04:04.411Z","repository":{"id":40464697,"uuid":"209117839","full_name":"containers/dnsname","owner":"containers","description":"name resolution for containers","archived":true,"fork":false,"pushed_at":"2023-11-27T16:24:37.000Z","size":3369,"stargazers_count":177,"open_issues_count":21,"forks_count":47,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-08T23:43:04.020Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/containers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-17T17:34:41.000Z","updated_at":"2024-07-30T19:00:50.000Z","dependencies_parsed_at":"2023-02-10T04:31:06.707Z","dependency_job_id":"706a632d-6628-473e-827e-34477f82bfe3","html_url":"https://github.com/containers/dnsname","commit_stats":{"total_commits":77,"total_committers":15,"mean_commits":5.133333333333334,"dds":0.7662337662337663,"last_synced_commit":"4189e8f449e7005a5affc2a7534de027313ef98b"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fdnsname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fdnsname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fdnsname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containers%2Fdnsname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/containers","download_url":"https://codeload.github.com/containers/dnsname/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229406087,"owners_count":18067995,"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-12-12T15:26:54.351Z","updated_at":"2025-10-21T13:03:58.530Z","avatar_url":"https://github.com/containers.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# dnsname plugin\n\n## IMPORTANT\n\nAs of 2023, this repository is no longer actively maintained. Our development efforts are happening in [netavark](https://github.com/containers/netavark/) and [aardvark-dns](https://github.com/containers/aardvark-dns/) that should provide a better alternative.\n\n## Overview\n\nThis plugin sets up the use of dnsmasq on a given CNI network so that Pods can resolve each other by name.  When configured,\nthe pod and its IP address are added to a network specific hosts file that dnsmasq reads in.  Similarly, when a pod\nis removed from the network, it will remove the entry from the hosts file.  Each CNI network will have its own dnsmasq\ninstance.\n\nThe *dnsname* plugin was specifically designed for the [Podman](https://github.com/containers/podman) container engine.\nFollow the [mini-tutorial](README_PODMAN.md) to use it with Podman.\n\n\n## Usage\nThe dnsname plugin can be enabled in the cni network configuration file.\n\n```\n{\n    \"cniVersion\": \"0.4.0\",\n    \"name\": \"cni-bridge-network\",\n    \"plugins\": [\n      {\n        \"type\": \"bridge\",\n        \"bridge\": \"cni0\",\n        ...\n        }\n      },\n      {\n        \"type\": \"dnsname\",\n        \"domainName\": \"foobar.com\",\n        \"capabilities\": {\n            \"aliases\": true\n        }\n      }\n    ]\n}\n```\n\n## DNSMasq configuration files\nThe dnsmasq service and its configuration files are considered to be very fluid and are not meant to survive a system\nreboot.  Therefore, files are stored in `/run/containers/cni/dnsname`, or under `$XDG_RUNTIME_DIR/containers/cni/dnsname` if\n`XDG_RUNTIME_DIR` is specified.  The plugin knows to recreate the necessary files if it detects they are not present.\n\n##  DNSMasq default configuration\nMuch like the implementation of DNSMasq for libvirt, this plugin will only set up dnsmasq to listen on the network\ninterfaces associated with the CNI network.  The DNSMasq services are not configured or managed by systemd but rather\nonly by the plugin itself.\n\n## Network aliases\nThe dnsname plugin is capable of not only adding the container name for DNS resolution but also adding network aliases. These\naliases are also added to the DNSMasq host file.\n\n## Reporting issues\nIf you are using dnsname code compiled directly from github, then reporting bugs and problem to the dnsname github issues tracker\nis appropriate.  In the case that you are using code compiled and provided by a Linux distribution, you should file the problem\nwith their appropriate bug tracker (bugzilla/trackpad).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainers%2Fdnsname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontainers%2Fdnsname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainers%2Fdnsname/lists"}