{"id":19311020,"url":"https://github.com/a0s/cloud-cleaner-rb","last_synced_at":"2026-06-20T07:31:44.635Z","repository":{"id":146414786,"uuid":"193882757","full_name":"a0s/cloud-cleaner-rb","owner":"a0s","description":"Handmade \"docker prune\" for docker swarm services.","archived":false,"fork":false,"pushed_at":"2019-12-16T22:34:15.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T06:37:50.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/a0s/cloud-cleaner-rb","language":"Ruby","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/a0s.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":"2019-06-26T10:26:33.000Z","updated_at":"2019-09-20T20:28:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"a991f810-e239-4322-8ff0-2f023861b393","html_url":"https://github.com/a0s/cloud-cleaner-rb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/a0s/cloud-cleaner-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Fcloud-cleaner-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Fcloud-cleaner-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Fcloud-cleaner-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Fcloud-cleaner-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a0s","download_url":"https://codeload.github.com/a0s/cloud-cleaner-rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Fcloud-cleaner-rb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34561766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-10T00:27:20.591Z","updated_at":"2026-06-20T07:31:44.612Z","avatar_url":"https://github.com/a0s.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-cleaner\n\n```bash\n./services --help\n\nRemoves old (after time threshold) docker swarm services. \nUsage: services [options]\n        --threshold=[TIME]           (required) Relative time threshold, example: \"2 days ago\"\n        --destructive                Run in destructive mode\n        --host=[URI|SOCKET]          Remote docker uri (http://...) or local socket (unix://...), default: unix:///var/run/docker.sock\n        --exclude-names=[STRING,STRING]\n                                     Exclude name from deletion process\n```\n\n## Examples\n\nDry-run to show what will be delete\n\n```bash\n./services --threshold=\"2 days ago\" --exclude-names=\"registrator\"\n```\n\nand then real deletion\n\n```bash\n./services --threshold=\"2 days ago\" --exclude-names=\"registrator\" --destructive\n```\n\nIn case you want temporary remote connection to `/var/run/docker.sock`  from other host (eg. local machine) you can use \n`socat` (described in [Forwarding TCP-traffic to a UNIX socket](https://coderwall.com/p/c3wyzq/forwarding-tcp-traffic-to-a-unix-socket)).\nFor example, for remote port 11111\n\n```bash\n./services --host=\"http://remote-swarm-host:11111\" --threshold=\"2 days ago\" --exclude-names=\"registrator\" --destructive\n```\n\n## TODO\n* Periodical running without cron\n* Image cleaner by [age, count].[min,max] conditions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa0s%2Fcloud-cleaner-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa0s%2Fcloud-cleaner-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa0s%2Fcloud-cleaner-rb/lists"}