{"id":20039654,"url":"https://github.com/bamarni/dockness","last_synced_at":"2025-05-05T07:32:44.993Z","repository":{"id":49375762,"uuid":"48609804","full_name":"bamarni/dockness","owner":"bamarni","description":"DNS for Docker machines","archived":false,"fork":false,"pushed_at":"2018-06-05T19:02:08.000Z","size":29,"stargazers_count":35,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T00:40:41.427Z","etag":null,"topics":["dns","dns-server","docker","docker-machine","domain-name"],"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/bamarni.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-12-26T12:24:11.000Z","updated_at":"2024-05-06T21:56:42.000Z","dependencies_parsed_at":"2022-08-25T08:02:45.813Z","dependency_job_id":null,"html_url":"https://github.com/bamarni/dockness","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fdockness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fdockness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fdockness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fdockness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bamarni","download_url":"https://codeload.github.com/bamarni/dockness/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224434856,"owners_count":17310706,"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":["dns","dns-server","docker","docker-machine","domain-name"],"created_at":"2024-11-13T10:38:34.053Z","updated_at":"2024-11-13T10:38:34.689Z","avatar_url":"https://github.com/bamarni.png","language":"Go","readme":"# dockness [![Build Status](https://travis-ci.org/bamarni/dockness.svg?branch=master)](https://travis-ci.org/bamarni/dockness)\n\nDNS for Docker machines, allows to access them with the following domain format : `{machine}.docker`.\n\n- [How it works](#how-it-works)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configure as a service](#configure-dockness-as-a-service)\n\n## How it works\n\nIt spins up a simplistic DNS server, only listening for questions about A records.\n\nBehind the scene it will use [libmachine](https://github.com/docker/machine) in order to resolve IP addresses.\n\n## Installation\n\n### Prebuilt binaries\n\nPrebuilt binaries are available in the [releases](https://github.com/bamarni/dockness/releases).\n\n### From source (requires Go)\n\n    go get github.com/bamarni/dockness\n\n### With [Homebrew](http://brew.sh/) (Mac OS X)\n\n    brew tap mkw/homebrew-mkw\n    brew install dockness\n\n## Usage\n\n    dockness [options...]\n\n    Options:\n      -tld    Top-level domain to use (defaults to \"docker\")\n      -ttl    Time to Live for DNS records (defaults to 0)\n      -port   Port to listen on (defaults to \"53\")\n      -debug  Enable debugging (defaults to false)\n\n### Mac OSX\n\nTo develop on Mac you probably have a local VM, using VirtualBox for example.\nHowever this machine gets assigned a dynamic IP address.\n\nYou can be up and running in a few commands, first :\n\n    \u003e echo -e \"nameserver 127.0.0.1\\nport 10053\" | sudo tee /etc/resolver/docker\n\nIt tells your Mac that the resolver for `.docker` TLD listens locally on port 10053. You can now run the resolver on this port :\n\n    \u003e dockness -port 10053\n    2016/02/18 10:39:52 Listening on :10053...\n\n### Linux\n\nEven though Linux users might not need a development VM, it can be useful for remote machines\n(eg. `ssh staging2.docker`, ...).\n\nHere and unlike Mac OSX, there is no quick trick to make it work out of the box. Linux distributions come\nwith more advanced DNS management where manually tweaking `resolv.conf` is usually not an option.\n\nWhat should work in most cases is to use [Dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html),\nwhich provides a lightweight DNS server.\n\nIf you have it installed, you can run :\n\n    \u003e dockness -port 10053\n    2016/02/18 10:40:43 Listening on :10053...\n\nThen let Dnsmasq know about the resolver by running those commands :\n\n    \u003e echo \"server=/docker/127.0.0.1#10053\" | sudo tee -a /etc/dnsmasq.conf\n    \u003e sudo /etc/init.d/dnsmasq restart\n\n## Configure dockness as a service\n\nAs it's not very convenient to run the program manually in a terminal, you can instead set it as a service.\nDoing so, it will be running in the background automatically when booting your computer.\n\n### Mac OSX\n\nYou can create the appropriate service configuration file at `~/Library/LaunchAgents/local.dockness.plist` :\n\n``` xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n        \u003ckey\u003eDisabled\u003c/key\u003e\n        \u003cfalse/\u003e\n        \u003ckey\u003eLabel\u003c/key\u003e\n        \u003cstring\u003elocal.dockness\u003c/string\u003e\n        \u003ckey\u003eProgramArguments\u003c/key\u003e\n        \u003carray\u003e\n                \u003cstring\u003e/path/to/dockness\u003c/string\u003e\n                \u003cstring\u003e-port\u003c/string\u003e\n                \u003cstring\u003e10053\u003c/string\u003e\n        \u003c/array\u003e\n        \u003ckey\u003eRunAtLoad\u003c/key\u003e\n        \u003ctrue/\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n\nFinally, the service can be enabled :\n\n    launchctl load ~/Library/LaunchAgents/local.dockness.plist\n\n### Linux\n\nHere again, it will depend on your Linux distribution.\nWe'll take as example [Systemd](https://freedesktop.org/wiki/Software/systemd/),\nwhich is nowadays the default init system in most distributions.\n\nCreate the following file at `/etc/systemd/system/dockness.service`:\n\n    [Unit]\n    Description=Dockness\n    After=network.target\n\n    [Service]\n    ExecStart=/path/to/dockness -port 10053\n\n    [Install]\n    WantedBy=multi-user.target\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamarni%2Fdockness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbamarni%2Fdockness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamarni%2Fdockness/lists"}