All Projects → ricardobranco777 → clean_registry

ricardobranco777 / clean_registry

Licence: MIT license
Clean the Docker Registry by removing untagged repositories. The optional flag -x may be used to remove repositories or tagged images

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to clean registry

Ormb
Docker for Your ML/DL Models Based on OCI Artifacts
Stars: ✭ 234 (+654.84%)
Mutual labels:  docker-registry
craneoperator
Gives you a simple web interface for browsing around a Docker Registry
Stars: ✭ 116 (+274.19%)
Mutual labels:  docker-registry
docker-image-mirror
simple bash script to copy often used docker images to our registry
Stars: ✭ 12 (-61.29%)
Mutual labels:  docker-registry
Docker Registry Browser
🐳 Web Interface for the Docker Registry HTTP API V2 written in Ruby on Rails.
Stars: ✭ 239 (+670.97%)
Mutual labels:  docker-registry
collage
read-only docker registry made of images coming from different locations
Stars: ✭ 23 (-25.81%)
Mutual labels:  docker-registry
docker-registry-artifact-plugin
The docker registry artifact plugin provides a way to push and pull docker images on GoCD
Stars: ✭ 21 (-32.26%)
Mutual labels:  docker-registry
Docker Build With Cache Action
Build and push docker images caching each stage to reduce build time
Stars: ✭ 228 (+635.48%)
Mutual labels:  docker-registry
imago
Ensure kubernetes pods run on latest images builds from the docker registry
Stars: ✭ 83 (+167.74%)
Mutual labels:  docker-registry
moadsd-ng
The MOADSD-NG project does provide a simple way to setup a hybrid cloud security demo, playground and learning environment within the clouds.
Stars: ✭ 13 (-58.06%)
Mutual labels:  docker-registry
ketos
Cross Container Builder (Ketos), a tasting project for Go Hackathon 2017 Shanghai. This project aims to help you building a docker image in CI platform better.
Stars: ✭ 20 (-35.48%)
Mutual labels:  docker-registry
copy-docker-image
Copy a Docker image between registries without a full Docker installation
Stars: ✭ 34 (+9.68%)
Mutual labels:  docker-registry
docker-credential-magic
A magic shim for Docker credential helpers 🪄
Stars: ✭ 56 (+80.65%)
Mutual labels:  docker-registry
headless-chrome-alpine
A Docker container running headless Chrome
Stars: ✭ 26 (-16.13%)
Mutual labels:  docker-registry
Nexus Cli
Nexus CLI for Docker Registry v2 🐳
Stars: ✭ 236 (+661.29%)
Mutual labels:  docker-registry
metalnetes
Create and manage multiple Kubernetes clusters using KVM on a bare metal Fedora 29 server. Includes helm + rook-ceph + nginx ingress + the stock analysis engine (jupyter + redis cluster + minio + automated cron jobs for data collection) - works on Kubernetes version v1.16.0 - 1.16.3 was not working
Stars: ✭ 37 (+19.35%)
Mutual labels:  docker-registry
Docker Registry Ui
Docker Registry UI
Stars: ✭ 233 (+651.61%)
Mutual labels:  docker-registry
docker-nginx-mainline
Devilbox's Nginx mainline (based on official Nginx Docker) [multi-arch]
Stars: ✭ 15 (-51.61%)
Mutual labels:  docker-registry
existing-ldap-docker-registry
This is a docker application to run Docker Registry behind an Ngnix in order to obtain an authentication method using a company Active Directory.
Stars: ✭ 29 (-6.45%)
Mutual labels:  docker-registry
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (+90.32%)
Mutual labels:  docker-registry
Create-your-own-docker.io
Create your own docker.io
Stars: ✭ 24 (-22.58%)
Mutual labels:  docker-registry

clean_registry

Clean the Docker Registry by removing untagged repositories and running the garbage collector in Docker Registry >= 2.4.0

The optional -x flag may be used to remove the specified repositories or tagged images.

Build Status

NOTE: With Docker Registry >= 2.7.0 you can run the garbage collector with the -m (--delete-untagged) option to remove untagged repositories but it doesn't work with multi-arch images as noted in this bug. The only workaround is to avoid multi-arch images and add the archictecture name to the tag.

This project is deprecated by regview which uses the Docker Registry API to delete manifests.

NOTES:

  • Make backups to avoid losing data.

  • This script stops the Registry container during cleanup to prevent corruption, making it temporarily unavailable to clients.

  • This script assumes the filesystem storage driver.

Running standalone

This script may be run as stand-alone with Python 3.6+ (local Docker setups) or dockerized (which supports both local and remote Docker setups). To run stand-alone, the best is to run in virtualenv and install required packages via pip:

virtualenv --python=python3 .venv
. .venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt

You may need to execute above commands as privileged user to access docker service (sudo + activate virtualenv).

Usage

Usage: clean_registry.py [OPTIONS] VOLUME|CONTAINER [REPOSITORY[:TAG]]...
Options:
        -x, --remove    Remove the specified images or repositories.
        -q, --quiet     Supress non-error messages.
        -v, --volume    Specify a volume instead of container.
        -V, --version   Show version and exit.

Docker usage with local Docker setup

docker run --rm --volumes-from CONTAINER -v /var/run/docker.sock:/var/run/docker.sock ricardobranco/clean_registry [OPTIONS] CONTAINER [REPOSITORY[:TAG]] ...

Docker usage with remote Docker setup

Make sure to read about remote Docker setup.

docker run --rm --volumes-from CONTAINER -e DOCKER_HOST -e DOCKER_TLS_VERIFY=1 -v /root/.docker:/root/.docker ricardobranco/clean_registry [OPTIONS] CONTAINER [REPOSITORY[:TAG]]...

Note:

Paths other than /root/.docker path may be specified with the DOCKER_CERT_PATH environment variable. In any case, your ~/.docker/*.pem files should be in the server to be able to run as a client against itself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].