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

Deleting image without tag #4282

Open
odoucet opened this issue Feb 20, 2024 · 1 comment
Open

Deleting image without tag #4282

odoucet opened this issue Feb 20, 2024 · 1 comment

Comments

@odoucet
Copy link

odoucet commented Feb 20, 2024

Description

Hello,

We setup a docker registry several years ago (june 2016). The registry has grown, despite launching garbage-collect regularly.
After several hours of search, I found that some containers have no more tags but still exists :

curl -k https://registry.example/v2/myimage/tags/list
{"name":"myimage","tags":null}

but there are still many blobs referenced by this image :

bin/garbage-collect |grep myimage 
myimage : marking blob sha256:6df02cd4a5e421225aa96cf1be299a9f0e3d22154376442e7505f42b7d38149f
myimage : marking blob sha256:9f5d97e8c9ccd84eaf3b27bf1681b6f69edbafd4de3f7c65cdb50ab3490db67e
[...]

=> 104504 blobs counted!

when checking filesystem directly :

/data/docker/registry/v2/repositories/myimage/_manifest/tags: 0 file
/data/docker/registry/v2/repositories/myimage/_manifest/revisions/sha256/: 8725 files

is this related to #3851 ?

What can I do to completely remove myimage ?

Reproduce

  1. launch registry
  2. upload many images+tags
  3. delete some tags
  4. run garbage-collect
  5. and do it over and over again

when deleting all tags for a specific image, the image must disappear

Expected behavior

No response

registry version

bin/registry github.com/docker/distribution 2.8.3

Additional Info

No response

@deleteriousEffect
Copy link
Member

@odoucet are you using the -m flag when you run garbage collect?

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

2 participants