Docker Registry RHEL 7 Garbage Collection


I have a private Docker Registry installed on a Redhat 7 OS and I try to perform a Garbage Collection.

Following the instructions as described in the documentation page:

When I execute the command line:
docker exec -it testregistry_registry_1 registry garbage-collect --dry-run /root/bin/config.yml

I get:
configuration error: open /root/bin/config.yml: no such file or directory

**Usage: **
** registry garbage-collect [flags]**
** -d, --dry-run=false: do everything except remove the blobs**
** -h, --help=false: help for garbage-collect**

Additional help topics:

I am under the folder /root/bin where config.yml file is present.

Does anyone has an idea about how to fix that please?

Possibly change your command to:
docker exec -it testregistryregistry_1 registry garbage-collect --dry-run /etc/docker/registry/config.yml

1 Like

thanks for your help!