2018-01-04 20:13:54 +00:00
|
|
|
# Luzifer / reg-clean
|
|
|
|
|
|
|
|
Cleanup S3 based Docker registry v2:
|
|
|
|
|
|
|
|
- Delete all non-tagged manifests
|
|
|
|
- Garbage-collection can remove the blobs
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```bash
|
|
|
|
## Build container (optional)
|
2018-01-04 20:37:46 +00:00
|
|
|
$ docker build -t quay.io/luzifer/reg-clean .
|
2018-01-04 20:13:54 +00:00
|
|
|
|
|
|
|
## Define AWS credentials
|
|
|
|
$ cat env
|
|
|
|
AWS_ACCESS_KEY_ID=myaccesskey
|
|
|
|
AWS_SECRET_ACCESS_KEY=mysecretaccesskey
|
|
|
|
AWS_DEFAULT_REGION=eu-west-1
|
|
|
|
|
|
|
|
AUTH=registryuser:pass
|
|
|
|
BUCKET=io.luzifer.docker-registry
|
|
|
|
REGISTRY=https://registry.luzifer.io
|
|
|
|
|
|
|
|
## Execute script
|
2018-01-04 20:37:46 +00:00
|
|
|
$ docker run --rm -ti --env-file=env quay.io/luzifer/reg-clean
|
2018-01-04 20:13:54 +00:00
|
|
|
```
|