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

Consequences of deleting an Docker Image in the file system #2983

Open
madushajg opened this issue Aug 21, 2019 · 3 comments
Open

Consequences of deleting an Docker Image in the file system #2983

madushajg opened this issue Aug 21, 2019 · 3 comments

Comments

@madushajg
Copy link

I have a requirement to delete a docker image that does not reference by any other image. There is no endpoint in the docker registry V2 API to accomplish this. I would like to know what are the consequences if I delete the image in the file system (var/lib/registry..) recursively. Your comments are highly appreciated.

@zymzxq
Copy link

zymzxq commented Aug 27, 2019

What does a docker image that does not reference by any other image mean?

@madushajg
Copy link
Author

madushajg commented Aug 30, 2019

It means the image that expected to be deleted is not used by any other image.
img1 <- img2 <- img3
Think there are 3 images img1, img2, img3, and img3 is referred by img2 while img2 is referred by img1. But img3 is not referred by any image.

@markzhang0928
Copy link

markzhang0928 commented Sep 11, 2019

If you delete an image file from filesystem directly, you could hardly to keep the consistency which cache in-memory if you enabled it.

it's confused that the delete request via registry delete api is just remove the link file. There are some issues related to this function. So, I wonder if the distribution project could support the 'hard' delete?

Joxit/docker-registry-ui#53
goharbor/harbor#8934

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