Skip to content

Daily garbage collection #302

@shaunco

Description

@shaunco

When containers or images are deleted from the registry, the space is never reclaimed from the underlying minio/s3 storage. To resolve this, it would be great to have a daily cron job that calls:

/usr/local/bin/docker-registry garbage-collect /etc/docker-registry.yml --delete-untagged

Daily seems fine, but perhaps the cron frequency expression could be overwritten by an ENV variable. That is, if I want it to only run at 4:05am on Sundays I could set something like this in my docker-compose or helm chart:

GARBAGE_COLLECTION_CRON_EXPRESSION: '5 4 * * sun'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions