Git Product home page Git Product logo

deckschrubber's Introduction

Deckschrubber

n. person responsible for scrubbing a ship's deck.

Go Report Card License

Deckschrubber inspects images of a Docker Registry and removes those older than a given age.

Quick Start

go get github.com/fraunhoferfokus/deckschrubber
$GOPATH/bin/deckschrubber

Why this?

We run our own private registry on a server with limited storage and it was only a question of time, until it was full! Although there are similar approaches to do Docker registry house keeping (in Python, Ruby, etc), a native module (using Docker's own packages) was missing. This module has the following advantages:

  • Is binary!: No runtime, Python, Ruby, etc. is required
  • Uses Docker API: same packages and modules used to relaze Docker registry are used here

Arguments

-day int
      max age in days
-debug
      run in debug mode      
-dry
      does not actually deletes
-latest int
      number of the latest matching images of an repository that won't be deleted (default 1)      
-month int
      max age in months
-registry string
      URL of registry (default "http://localhost:5000")
-repo string
      matching repositories (allows regexp) (default ".*")      
-repos int
      number of repositories to garbage collect (default 5)
-tag string
      matching tags (allows regexp) (default ".*")      
-v    shows version and quits
-year int
      max age in days
      
      

Examples

  • Remove all images older than 2 months and 2 days
$GOPATH/bin/deckschrubber -month 2 -day 2
  • Remove all images older than 1 year from http://myrepo:5000
$GOPATH/bin/deckschrubber -year 1 -registry http://myrepo:5000
  • Analyize (but do not remove) images of 30 repositories
$GOPATH/bin/deckschrubber -repos 30 -dry
  • Remove all images of each repository except the 3 latest ones
$GOPATH/bin/deckschrubber -latest 3 
  • Remove all images with tags that ends with '-SNAPSHOT'
$GOPATH/bin/deckschrubber -tag ^.*-SNAPSHOT$ 

deckschrubber's People

Contributors

misamura avatar yan-foto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.