Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker registry v2.1 delete images error 405 method not allowed #1326

Closed
maxwell92 opened this issue Jan 7, 2016 · 4 comments
Closed

docker registry v2.1 delete images error 405 method not allowed #1326

maxwell92 opened this issue Jan 7, 2016 · 4 comments

Comments

@maxwell92
Copy link

I push a image test-busybox. And I found that using DELETE /v2/NAME/manifests/DIGEST can delete the image on https://docs.docker.com/registry/spec/api/#deleting-a-layer . I tried but I failed. I got a response like this: HTTP 405 Method Not Allowed. What's the problem?

@RichardScothern
Copy link
Contributor

Did you configure delete to be enabled?

https://docs.docker.com/registry/configuration/#delete

On Wed, Jan 6, 2016 at 7:12 PM, maxwell notifications@github.com wrote:


Reply to this email directly or view it on GitHub
#1326.

@maxwell92
Copy link
Author

@RichardScothern Yes. I write the command like this:
docker run -d -p 5000:5000 --restart=always --name registry
-v pwd/certs:/certs
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key
-v /images/:/var/lib/registry
-e REGISTRY_STORAGE_DELETE_ENABLED=true
registry:2.1
is there something wrong?

@RichardScothern
Copy link
Contributor

The config looks correct. Please post the registry logs and your delete command.

@BrianBland
Copy link
Contributor

It's most likely this was fixed in v2.2 by #888

The REGISTRY_STORAGE_DELETE struct would not exist at time of handling REGISTRY_STORAGE_DELETE_ENABLED so deletes would not be enabled.

Closing for bookkeeping, feel free to comment/reopen if you're still encountering this issue.

nobrin added a commit to nobrin/docker-regiui that referenced this issue Feb 16, 2017
- REGIUI_REGISTRY -- Registry(v2) address (default: http://localhost:5000)
- REGIUI_HREF_PREFIX -- If you want to use with reverse proxy, you can set prefix. This value will be settle before links in HTML. (default: /)
- REGIUI_DELETE_ENABLED -- Turn on feature of deleting repos/tags. You must use with Registry which has been started with [REGISTRY_STORAGE_DELETE_ENABLED=true](distribution/distribution#1326). (default: false)
- REGIUI_DATA_PATH -- Path to store descriptions(default: $HOME/.local/share/regiui)

Fix environment variable on Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants