GithubHelp home page GithubHelp logo

tumblr / docker-registry-pruner Goto Github PK

View Code? Open in Web Editor NEW
126.0 8.0 4.0 60 KB

Tool to apply retention logic to docker images in a Docker Registry

License: Apache License 2.0

Dockerfile 0.83% Makefile 9.77% Shell 2.08% Ruby 3.36% Go 83.96%
docker registry docker-image docker-image-registry cleanup maintenance

docker-registry-pruner's Introduction

docker-registry-pruner ๐Ÿณโœ‚๏ธ

docker-registry-pruner is a rules-based tool that applies business logic to docker images in a Docker Registry storage system for retention.

GitHub release Build Status Docker Image Docker Automated build Docker Build Status MicroBadger Size Docker Pulls Docker Stars Godoc

Documentation

Quickstart

See configuration overview for how to write a config file. Then, map it into your container and run the report!

$ docker run -ti -v $(pwd)/config:/app/config --rm tumblr/docker-registry-pruner --mode report --config ./config/myconfig.yaml

Once you are happy with the report, you can perform pruning! WARNING: this is destructive!

$ docker run -ti -v $(pwd)/config:/app/config --rm tumblr/docker-registry-pruner --mode prune --config ./config/myconfig.yaml

Configuration

See the configuration overview for how to write config files to apply retention rules to images in your Registry.

Examples

Check out docs/examples.md for examples using the CLI tool.

Hacking

See docs/hacking.md for how to hack and contribute.

License

Apache 2.0

Copyright 2019, Tumblr, Inc.

docker-registry-pruner's People

Contributors

byxorna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

superherointj

docker-registry-pruner's Issues

Default (fallback) rule or match repo names with glob / regexp

Thanks for the great tool, it looks really promisingly!

We have a lot of different repos in our registry and it's not possible to add a rule for each of them.

It would be really helpful to be able to specify default rule or match repo names with glob/regexp

Interoperability with sonatype nexus

I'm trying to run it against sonatype nexus docker repo, but unfortunately, it doesn't work

It prints warnings for every image
{"level":"warn","ts":1565175668.1175723,"caller":"client/client.go:86","msg":"error fetching manifest","repo":"somerepoy/some-image","tag":"2.8.2-50-ed92e4a4","error":"unexpected manifest schema was received from registry: application/vnd.docker.distribution.manifest.v1+json"}

Not working with latest Gitlab registry (13.9.1)

Not remove images with error:
{"level":"warn","ts":1614668206.9399998,"caller":"client/client.go:86","msg":"error fetching manifest","repo":"devops/maintenance","tag":"master-13676","error":"unexpected manifest schema was received from registry: application/vnd.docker.distribution.manifest.v2+json (registry may not support the manifest type(s) you want: [application/vnd.docker.distribution.manifest.v1+prettyjws application/vnd.docker.distribution.manifest.v1+json])"}

No flag to bypass certificate verfication

My private registry is not using a signed certificate. So, when I set up a rule and try to purge old tags, I get the following error:

{"level":"fatal","ts":1581695501.6666298,"caller":"cmd/main.go:49","msg":"Get https://private-registry.testing.com/v2/: x509: certificate signed by unknown authority","stacktrace":"main.main\n\t/app/cmd/main.go:49\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:200"}

Is there an option I can use to bypass certificate verification?

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.