{"id":17482398,"url":"https://github.com/jack12816/docker-mdns","last_synced_at":"2025-04-22T14:09:58.300Z","repository":{"id":152209340,"uuid":"99040205","full_name":"Jack12816/docker-mdns","owner":"Jack12816","description":"Simple mDNS/ZeroConf demonstration of a nginx container, acessible at http://nginx.local","archived":false,"fork":false,"pushed_at":"2017-08-01T20:24:08.000Z","size":134,"stargazers_count":26,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-22T14:09:51.641Z","etag":null,"topics":["docker","docker-compose","make","mdns","nginx","zeroconf"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/Jack12816.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":"2017-08-01T20:23:52.000Z","updated_at":"2023-03-13T17:29:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc9e8807-e4b2-41b7-92d3-5d58d3e339da","html_url":"https://github.com/Jack12816/docker-mdns","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"1147f9737ad6ded51c98717693dbee0bbcc4e2ab"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack12816%2Fdocker-mdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack12816%2Fdocker-mdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack12816%2Fdocker-mdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jack12816%2Fdocker-mdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jack12816","download_url":"https://codeload.github.com/Jack12816/docker-mdns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250255701,"owners_count":21400410,"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":["docker","docker-compose","make","mdns","nginx","zeroconf"],"created_at":"2024-10-18T23:05:58.142Z","updated_at":"2025-04-22T14:09:58.296Z","avatar_url":"https://github.com/Jack12816.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Docker mDNS Demo](docs/assets/project.png)\n\nThis prototype is dedicated to demonstrate the setup of Docker containers which\nare accessible by mDNS addresses. The regular ZeroConf TLD is `.local`.  So\nwith the help of this demo you can learn how to setup a new container and make\nit available as [nginx.local](http://nginx.local).\n\n## Requirements\n\n* [Docker](https://www.docker.com/community-edition) (\u003e=17.06.0-ce) (lower should work, too)\n* [Docker Compose](https://docs.docker.com/compose/install/) (\u003e=1.15.0) (lower should work, too)\n* [GNU Make](https://www.gnu.org/software/make/) (\u003e=4.2.1)\n* [jq](https://stedolan.github.io/jq/download/) (\u003e=1.5)\n* Host enabled Avahi daemon\n* Host enabled mDNS NSS lookup\n\n## Getting started\n\nAll you need to to is to run the following command:\n\n```bash\n$ make start\n```\n\nThis command will take care of downloading the `nginx:latest` docker image and\nbuilding the custom image on top of it. Afterwards the new image will be\nbooted.\n\nStart a second terminal and type the following command to verify your host\nconfiguration:\n\n```bash\n$ make test\n```\n\nIf everything is fine, you will see something like this:\n\n```bash\n# Test the IP/mDNS setup\n#\n# \u003e Container ip: 172.17.0.2\n#\n# DNS resolution test (nginx.local):\nPING nginx.local (172.17.0.2) 56(84) bytes of data.\n64 bytes from 172.17.0.2 (172.17.0.2): icmp_seq=1 ttl=64 time=0.062 ms\n64 bytes from 172.17.0.2 (172.17.0.2): icmp_seq=2 ttl=64 time=0.053 ms\n64 bytes from 172.17.0.2 (172.17.0.2): icmp_seq=3 ttl=64 time=0.102 ms\n64 bytes from 172.17.0.2 (172.17.0.2): icmp_seq=4 ttl=64 time=0.079 ms\n\n--- nginx.local ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3034ms\nrtt min/avg/max/mdev = 0.053/0.074/0.102/0.018 ms\n#\n# Test was successful. Yay.\n```\n\nIf the test fails, read on.\n\n## Host configs\n\nInstall the nss-mdns package, enable and start the avahi-daemon.service. Then,\nedit the file /etc/nsswitch.conf and change the hosts line like this:\n\n```bash\nhosts: ... mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns ...\n```\n\n## Further reading\n\n* Archlinux howto: https://wiki.archlinux.org/index.php/avahi\n* Ubuntu/Debian howto: https://wiki.ubuntuusers.de/Avahi/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack12816%2Fdocker-mdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjack12816%2Fdocker-mdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack12816%2Fdocker-mdns/lists"}