https://github.com/docwhat/docker-gc
The missing docker garbage collector
https://github.com/docwhat/docker-gc
Last synced: about 1 year ago
JSON representation
The missing docker garbage collector
- Host: GitHub
- URL: https://github.com/docwhat/docker-gc
- Owner: docwhat
- License: mit
- Created: 2016-05-05T06:00:15.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2023-04-06T05:52:14.000Z (about 3 years ago)
- Last Synced: 2025-03-22T04:51:15.689Z (over 1 year ago)
- Language: Go
- Size: 779 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/docwhat/docker-gc/releases)
[](https://microbadger.com/images/docwhat/docker-gc)
[](https://godoc.org/github.com/docwhat/docker-gc)
[](https://travis-ci.org/docwhat/docker-gc)
[](https://goreportcard.com/report/github.com/docwhat/docker-gc)
[](https://codecov.io/gh/docwhat/docker-gc)
[](https://github.com/docwhat/docker-gc/issues)
Docker GC
=========
> The missing garbage collector for docker
Installation
------------
### Binaries
I have pre-built binaries for several platform already. They are available on the [releases page](https://github.com/docwhat/docker-gc/releases).
### Container
I also have pre-built containers available on [Docker Hub](https://hub.docker.com/r/docwhat/docker-gc/).
You can use this via `docker run`:
``` .sh
$ docker run -d -v /var/run/docker:/var/run/docker --name=gc docwhat/docker-gc:latest
```
### Source
If you have go installed, then you can get the binary `docker-gc` with the following command:
``` .sh
$ go get -u -v github.com/docwhat/docker-gc
```
Usage
-----
usage: docker-gc_darwin_amd64 []
The missing docker garbage collector.
Flags:
-h, --help Show context-sensitive help (also try --help-long
and --help-man).
--version Show application version.
-m, --max-image-age=168h How old to allow images to be before deletion. (Env:
DOCKER_GC_MAX_IMAGE_AGE)
-s, --sweeper-time=15m How much time between running checks to delete
images. (Env: DOCKER_GC_SWEEPER_TIME)
-d, --dangle-safe-duration=30m
How old should a dangle image be before deletion.
(Env: DOCKER_GC_DANGLE_SAFE_DURATION)
-q, --quiet Don't show any output. (Env: DOCKER_GC_QUIET)
It uses the normal Docker environment variables, so if `docker info` works, then `docker-gc` should work.
Developers
----------
I love contributions! Read [CONTRIBUTING.md](CONTRIBUTING.md) for details.