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

Delete API not supported #33

Closed
sajayantony opened this issue Mar 14, 2017 · 14 comments
Closed

Delete API not supported #33

sajayantony opened this issue Mar 14, 2017 · 14 comments
Assignees

Comments

@sajayantony
Copy link
Contributor

This is a tracking issue which was called out in our CLI repository Azure/azure-cli#2445

@SteveLasker
Copy link
Contributor

@karolz-ms
Copy link

@SteveLasker Can we increase the priority on this? I am somewhat surprised CR got to GA without the ability to delete a repository.

@SteveLasker
Copy link
Contributor

SteveLasker commented Apr 17, 2017

Delete of an image isn't yet supported by Docker either. You can of course delete the repo.
Due to dependency tracking of multiple layers, deleting can be quite complicated to assure you've done the right thing and didn't orphan other images that share layers.
The ability to delete is part of the managed storage work that we're planning on previewing early June.

@marcusschiesser
Copy link

I understand that it's good for Azure's business that we can not delete any images, so my monthly bill keeps increasing. More important in this context however - Is there any limit on the size of an ACR repository?

@SteveLasker
Copy link
Contributor

I'm sorry Marcus, we are working through the delete capabilities and will have it out asap. The feature is part of the managed storage feature which we believe will provide many more benefits as a group. Once we get managed storage in place, it will be easier for us to get features out more quickly.
Image Storage is based on Azure blob storage which has a default 500TB limit.
https://github.com/Microsoft/azure-docs/blob/master/includes/azure-storage-limits.md
We really do hear and appreciate this need and will have a preview out as soon as possible.
Steve

@titilambert
Copy link

titilambert commented Apr 21, 2017

@SteveLasker can you confirm that we can still delete images by deleting blobs in the storage account ?

@sajayantony
Copy link
Contributor Author

@titilambert - The manifests can be deleted in your storage account. The name of the container in your storage account is the name of your registry.

⚠️ At this point you are at the risk of corrupting your registry.

Here I have an image tagged hello-world:2

image

I can remove the folder <container>//docker/registry/v2/repositories/hello-world/_manifests/tags/2

image

Layer data (the actual manifest and binary blobs) aren't stored in that folder and instead under blobs. For e.g. If the manifest has a sha256 of 2075ac87b043415d35bb6351b4a59df19b8ad154e578f7048335feeb02d0f759 the data blob for the manifest is actually stored as a layer. So technically you are just deleting an entry to the manifest.

<container>//docker/registry/v2/blobs/sha256/20/2075ac87b043415d35bb6351b4a59df19b8ad154e578f7048335feeb02d0f759

And if you list repositories now you will see only

image

@titilambert
Copy link

@sajayantony Thanks ! This is really helpful !

@sajayantony
Copy link
Contributor Author

@yuwaMSFT2 do you know of any side effects to dropping the tag folder, such as issues to reference links.

@yuwaMSFT2
Copy link
Contributor

No...you can delete the tag folder if you don't want the image:tag to be retrievable.

A specific version of manifest has another reference here:
//docker/registry/v2/repositories/hello-world/_manifests/revisions/sha256
If you delete tag folder only, docker pull image:tag will fail; but user can still request the specific manifest by SHA through REST API. If you also delete the reference in _manifests/revisions/sha256/xxxxx folder, then user cannot request that manifest by SHA as well.

@SteveLasker
Copy link
Contributor

SteveLasker commented Jul 6, 2017

https://docs.microsoft.com/en-us/cli/azure/acr/repository#delete
Note: I'm updating this response as I accidentally posted the wrong delete API.

@sajayantony
Copy link
Contributor Author

Closing this issue since deletes are now available through the new SKUs which are currently in preview.

@zdraganov
Copy link

Somebody who wants to post azure-cli example usage here?

@SteveLasker
Copy link
Contributor

Usage of delete? I realized I posted the wrong doc link above:
Here's the correct repository delete docs, with examples:
https://docs.microsoft.com/en-us/cli/azure/acr/repository#delete

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

No branches or pull requests

7 participants