An open API service indexing awesome lists of open source software.

https://github.com/clever/prune-images

a worker that prunes old images from ECR and Docker Hub
https://github.com/clever/prune-images

Last synced: 12 months ago
JSON representation

a worker that prunes old images from ECR and Docker Hub

Awesome Lists containing this project

README

          

# prune-images

Prune-images is a worker that removes old images from Amazon ECR and Docker Hub. It will retain the 100 most recent images on Docker Hub and remove the rest. All of the images that were removed on Docker Hub will also be removed on Amazon ECR.

## Deploying

To run on production:
```
ark start prune-images -e production
```

**Important**: when a job is submitted to a worker that is running on production, the images that qualify for pruning will actually be removed. There is a `DRY_RUN` environment variable that is available which will return all the images that will be deleted, but will not perform the delete.

## Required Environment Variables

`DRY_RUN`: can be either `true` or `false`. Indicateds whether or not the delete will occur for images that qualify for pruning. If `true`, then the worker's output will print the delete calls that will be made to Amazon ECR.