mortensteenrasmussen / docker-registry-manifest-cleanup

Cleans up docker registry by removing untagged manifests from the registry
Apache License 2.0
146 stars 33 forks source link

Method not allowed #2

Closed jarischaefer closed 7 years ago

jarischaefer commented 7 years ago

I get the following errors using the 2.6.1 registry:

docker run -it -v /path/to/registry:/registry -e REGISTRY_URL=http://example.com:5000 mortensrasmussen/docker-registry-manifest-cleanup Found 2936 manifests. Starting to clean up curl: (22) The requested URL returned error: 405 Method Not Allowed curl: (22) The requested URL returned error: 405 Method Not Allowed

jarischaefer commented 7 years ago

Seems like I missed https://docs.docker.com/registry/configuration/#delete

Perhaps including a hint in the script's output could make things more obvious.

mortensteenrasmussen commented 7 years ago

Hi,

Please make sure your registry has deletion enabled. In a docker run command, you set it in an environment variable like this: -e REGISTRY_STORAGE_DELETE_ENABLED=true

For example: docker run -d -p 5000:5000 --name registry -v /images/:/var/lib/registry -e REGISTRY_STORAGE_DELETE_ENABLED=true registry:2.6.1

mortensteenrasmussen commented 7 years ago

Good idea, I'll do that for the next version! Glad you got it working