{"id":22109208,"url":"https://github.com/psvmcc/disconter","last_synced_at":"2026-04-29T08:02:39.067Z","repository":{"id":226302261,"uuid":"768286877","full_name":"psvmcc/disconter","owner":"psvmcc","description":"Discovery docker containers service","archived":false,"fork":false,"pushed_at":"2025-01-04T08:44:39.000Z","size":2143,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T03:47:46.241Z","etag":null,"topics":["container","containers","discovery","discovery-service","dns","docker","podman"],"latest_commit_sha":null,"homepage":"","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/psvmcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-03-06T20:07:50.000Z","updated_at":"2025-01-04T08:44:43.000Z","dependencies_parsed_at":"2024-12-01T09:30:11.334Z","dependency_job_id":"457404f8-d345-4ead-8544-ca76c7a8b361","html_url":"https://github.com/psvmcc/disconter","commit_stats":null,"previous_names":["psvmcc/disconter"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/psvmcc/disconter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psvmcc%2Fdisconter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psvmcc%2Fdisconter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psvmcc%2Fdisconter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psvmcc%2Fdisconter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psvmcc","download_url":"https://codeload.github.com/psvmcc/disconter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psvmcc%2Fdisconter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["container","containers","discovery","discovery-service","dns","docker","podman"],"created_at":"2024-12-01T09:29:50.381Z","updated_at":"2026-04-29T08:02:39.046Z","avatar_url":"https://github.com/psvmcc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# disconter - discovery containers(docker and podman)\n\n## run\n```\npodman run --rm --net=host -v /run/podman/podman.sock:/var/run/docker.sock ghcr.io/psvmcc/disconter:latest\n```\n\n## how it works\n\n```\nUsage of /disconter:\n  -bind.dns string\n    \tBind the DNS server (default \"0.0.0.0:53535\")\n  -bind.metrics string\n    \tBind the HTTP metrics server (default \"0.0.0.0:9553\")\n  -debug\n    \tEnable debug logging\n  -docker.refresh.interval int\n    \tContainer events refresh interval in milliseconds (default 100)\n  -docker.socket string\n    \tDocker(Podman) socket path (default \"/var/run/docker.sock\")\n  -metrics.go\n    \tExtend Golang metrics (default true)\n  -v\tPrint version\n```\n\n### labels\n- **disconter.service** - name of the service, if set then watching for events of this container\n- **disconter.service.priority** - dns discovery priority, default 1\n- **disconter.service.weight** - dns discovery weight, default 1\n- **disconter.service.port** - dns discovery port, default 80\n- **disconter.service.ttl** - dns discovery ttl in seconds, default 0\n\n### run container with label `disconter.service`\n```\npodman run --rm -l disconter.service=test -ti centos bash\n```\n\n### dig\n\n#### srv\n```\n$ dig @127.0.0.1 -p 53535 _test._tcp.service.disconter SRV\n\n; \u003c\u003c\u003e\u003e DiG 9.18.24 \u003c\u003c\u003e\u003e @127.0.0.1 -p 53535 _test._tcp.service.disconter SRV\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 33492\n;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n;; WARNING: recursion requested but not available\n\n;; QUESTION SECTION:\n;_test._tcp.service.disconter.\tIN\tSRV\n\n;; ANSWER SECTION:\n_test._tcp.service.disconter. 0\tIN\tSRV\t1 1 80 nice_golick.container.disconter.\n\n;; ADDITIONAL SECTION:\nnice_golick.container.disconter. 0 IN\tA\t10.88.0.5\n\n;; Query time: 3 msec\n;; SERVER: 127.0.0.1#53535(127.0.0.1) (UDP)\n;; WHEN: Wed Mar 06 20:32:46 UTC 2024\n;; MSG SIZE  rcvd: 172\n```\nor\n\n```\n$ dig @127.0.0.1 -p 53535 test.service.disconter SRV\n\n; \u003c\u003c\u003e\u003e DiG 9.18.24 \u003c\u003c\u003e\u003e @127.0.0.1 -p 53535 test.service.disconter SRV\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 22671\n;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n;; WARNING: recursion requested but not available\n\n;; QUESTION SECTION:\n;test.service.disconter.\t\tIN\tSRV\n\n;; ANSWER SECTION:\ntest.service.disconter.\t0\tIN\tSRV\t1 1 80 nice_golick.container.disconter.\n\n;; ADDITIONAL SECTION:\nnice_golick.container.disconter. 0 IN\tA\t10.88.0.5\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53535(127.0.0.1) (UDP)\n;; WHEN: Wed Mar 06 20:33:54 UTC 2024\n;; MSG SIZE  rcvd: 160\n```\n\n\n#### a\n```\n$ dig @127.0.0.1 -p 53535 test.service.disconter A\n\n; \u003c\u003c\u003e\u003e DiG 9.18.24 \u003c\u003c\u003e\u003e @127.0.0.1 -p 53535 test.service.disconter A\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 34103\n;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\n;; WARNING: recursion requested but not available\n\n;; QUESTION SECTION:\n;test.service.disconter.\t\tIN\tA\n\n;; ANSWER SECTION:\ntest.service.disconter.\t0\tIN\tA\t10.88.0.5\n\n;; Query time: 3 msec\n;; SERVER: 127.0.0.1#53535(127.0.0.1) (UDP)\n;; WHEN: Wed Mar 06 20:34:34 UTC 2024\n;; MSG SIZE  rcvd: 78\n```\n\nor container by name `nice_golick`\n\n```\n$ dig @127.0.0.1 -p 53535 nice_golick.container.disconter A\n\n; \u003c\u003c\u003e\u003e DiG 9.18.24 \u003c\u003c\u003e\u003e @127.0.0.1 -p 53535 nice_golick.container.disconter A\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 20492\n;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\n;; WARNING: recursion requested but not available\n\n;; QUESTION SECTION:\n;nice_golick.container.disconter. IN\tA\n\n;; ANSWER SECTION:\nnice_golick.container.disconter. 0 IN\tA\t10.88.0.5\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53535(127.0.0.1) (UDP)\n;; WHEN: Wed Mar 06 20:35:50 UTC 2024\n;; MSG SIZE  rcvd: 96\n```\n\n### metrics\n\n```\n$ curl 127.0.0.1:9553/metrics -s |grep disco\ndisconter_dns_queries_total 7\ndisconter_dns_queries{type=\"A\"} 3\ndisconter_dns_queries{type=\"SRV\"} 4\ndisconter_info{version=\"v0.0.0\",commit=\"7639f0cf6424a0d4be7a93ada21b78a0c33394fc\"} 0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsvmcc%2Fdisconter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsvmcc%2Fdisconter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsvmcc%2Fdisconter/lists"}