Ricardo Branco f28887db63 Support docker-py 3.0.x | vor 6 Jahren | |
---|---|---|
Dockerfile | vor 6 Jahren | |
LICENSE | vor 6 Jahren | |
README.md | vor 6 Jahren | |
clean_registry.py | vor 6 Jahren |
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.
NOTES:
pip3 install docker pyyaml
clean_registry.py [OPTIONS] CONTAINER [REPOSITORY[:TAG]]...
Options:
-x, --remove Remove the specified images or repositories.
-q, --quiet Supress non-error messages.
-V, --version Show version and exit.
docker run --rm --volumes-from CONTAINER -v /var/run/docker.sock:/var/run/docker.sock ricardobranco/clean_registry [OPTIONS] CONTAINER [REPOSITORY[:TAG]]...
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.