{"id":16670062,"url":"https://github.com/liske/docker-prune","last_synced_at":"2026-04-21T23:02:08.719Z","repository":{"id":140083710,"uuid":"108754224","full_name":"liske/docker-prune","owner":"liske","description":"Executes docker prune commands to allow automatic cleanup on docker nodes.","archived":false,"fork":false,"pushed_at":"2017-10-29T17:50:29.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-31T14:44:38.552Z","etag":null,"topics":["docker-image","docker-swarm"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/liske.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-29T17:12:45.000Z","updated_at":"2024-06-03T08:18:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"bdfdbadd-74b3-4b42-a9a4-814bdf6cc275","html_url":"https://github.com/liske/docker-prune","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liske/docker-prune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liske%2Fdocker-prune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liske%2Fdocker-prune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liske%2Fdocker-prune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liske%2Fdocker-prune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liske","download_url":"https://codeload.github.com/liske/docker-prune/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liske%2Fdocker-prune/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32113748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["docker-image","docker-swarm"],"created_at":"2024-10-12T11:36:54.341Z","updated_at":"2026-04-21T23:02:08.715Z","avatar_url":"https://github.com/liske.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Prune\n\n\n## About\n\nExecutes `docker $type prune` command to allow automatic cleanup on docker nodes. This is simular to [docker-system-prune](https://github.com/softonic/docker-system-prune), but allows more control of which object types will be pruned.\n\nBy default the following object types are pruned:\n- container\n- volume\n- network\n\n*Docker Prune* by default does not prune docker images since they may be still used in the future and downloading them again from a registry might waste resources.\n\nThis image was created to cleanup docker swarm clusters regulary.\n\n\n## Usage\n\nTake a look at the example [docker-stack.yml](https://github.com/liske/docker-prune/blob/master/docker-stack.yml) file to regulary cleanup all swarm nodes.\n\nThe cleanup interval can be supplied by setting the `SLEEP` environment variable to the number of seconds between runs. If the `SLEEP` environment variable is empty a one-shot cleanup is done. Alternatively the [restart_policy configuration option](https://docs.docker.com/compose/compose-file/#restart_policy) in the compose file can be used to restart *docker-prune* regulary.\n\nThe object types to be pruned can be passed as parameter (using `docker run`) or the [command configuration option](https://docs.docker.com/compose/compose-file/#command) in the compose file:\n```\n    command: [\"container\", \"volume\", \"network\"]\n```\n\n\nTo give it a one-shot try to remove unused images, only:\n```\n$ docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock liske/docker-prune image\n\u003e\u003e\u003e docker image prune \u003c\u003c\u003c\nDeleted Images:\ndeleted: sha256:115c7fd768e29aeaa7b73c49038e3ef90c9a4442148cc70551044783a5c3b77b\ndeleted: sha256:475df15d32b7f8386512b7dc5f4f845c258e3f5d1e50aea3ac5bb9eeaba1b845\ndeleted: sha256:667ef6c992d85f5b74d5fec93f1f1502f8998f100777517b89e4dbb7b3579645\ndeleted: sha256:6a1c0a862d42702df4fc256166e4e63623b7ac75403cb8a1fc8c1f056df3d299\ndeleted: sha256:d48b5de8ab62215be74ed7718f5dd22320d4030429deb38eba2845ec1c49602e\ndeleted: sha256:8c88801e4e750035322abfabb6d2b910470cac9cd5b21c93cbfec3c19cd1dbc6\ndeleted: sha256:3219867dba3087b460e46078893052a53bc5c69dd6775a28e4e709e2f40c6164\ndeleted: sha256:49a415acbc8dba4683a54938ad125e80269f163894b5f0d28df8e86760fd0327\ndeleted: sha256:4992b2273f11db6e650b72389f10fd7db78264df95e40799b6ab18c60f56a41b\ndeleted: sha256:d6202f1cda4713538f48fb75d565455c4ef50558aafa843a7cc4e9e390d7d818\ndeleted: sha256:8659d27968a9bc611626a5b5f8282f115f3a699ddd749323cba43837c48e00b7\ndeleted: sha256:079e0c10aae2262a592907c1d284cb900b81edebed3162d293244f264793d988\n\nTotal reclaimed space: 681B\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliske%2Fdocker-prune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliske%2Fdocker-prune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliske%2Fdocker-prune/lists"}