Skip to content

docwhat/docker-gc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub release Docker Image Layers GoDoc

Build Status Go Report Card Code Coverage GitHub 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.

Container

I also have pre-built containers available on Docker Hub.

You can use this via docker run:

$ 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:

$ go get -u -v github.com/docwhat/docker-gc

Usage

usage: docker-gc_darwin_amd64 [<flags>]

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 for details.

About

The missing docker garbage collector

Resources

License

Stars

Watchers

Forks

Packages

No packages published