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 one tag of a multi-platform image leaves session in a state where all tags show the same sha256 digest #337

Closed
plevart opened this issue Oct 1, 2023 · 2 comments

Comments

@plevart
Copy link

plevart commented Oct 1, 2023

Hi, I use this docker registry UI and I have an issue...

Latest release (2.5.2). Logging in (Basic Auth) shows the following list of tags (all images are mul;ti-platform, so I don't know whether this matters and can't compare behaviour with a single-platform image):

image

Deleting one tag (for example, the oldest), works as expected:

image

But after that, when the deleted tag is gone from display, remaining tags strangely show the same SHA256:

image

When attempting to delete another tag in this state, the dialog suggests to delete all of them:

image

Reloading the browser page doesn't help. Only closing the tab and opening new one gives consistent view again:

image

As can be seen, none of the image tags shown actually has the sha256 digest that is shown for all tags immediately after deleting one tag. It is totaly made-up from I don't know what.

My private docker registry configuration

version: 0.1
log:
  fields:
    service: registry
storage:
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /data
  delete:
    enabled: true
auth:
  htpasswd:
    realm: basic-realm
    path: /etc/docker/registry/htpasswd
http:
  addr: :5000
  headers:
    X-Content-Type-Options: [nosniff]
    Access-Control-Allow-Origin: ['*']
    Access-Control-Allow-Credentials: [true]
    Access-Control-Allow-Headers: ['Authorization', 'Accept', 'Cache-Control']
    Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
    Access-Control-Expose-Headers: ['Docker-Content-Digest']
health:
  storagedriver:
    enabled: true
    interval: 10s
    threshold: 3

The Docker UI config (run as docker registry sidecar container in the same pod as docker registry - sharing network namespace):

          env:
            - name: NGINX_LISTEN_PORT
              value: '8080'
            - name: NGINX_PROXY_PASS_URL
              value: http://127.0.0.1:5000
            - name: REGISTRY_TITLE
              value: MoodDev
            - name: PULL_URL
              value: http://oci.mooddev.eu
            - name: DELETE_IMAGES
              value: 'true'
            - name: SHOW_CONTENT_DIGEST
              value: 'true'
            - name: SHOW_CATALOG_NB_TAGS
              value: 'true'
            - name: SINGLE_REGISTRY
              value: 'true'
            - name: REGISTRY_SECURED
              value: 'true'

Expected behavior

Without this bug

System information

  • OS: [OCI image executed on k8s]
  • Browser:
    • Name: Brave
    • Version: 1.58.131 Chromium: 117.0.5938.92
  • Docker registry:
    • Version: 2.8.2
  • Docker registry UI:
    • Version: 2.5.2
    • Server: k8s cluster
    • Docker version: (not docker - cri-o 1.26)
    • Docker registry ui tag: 2.5.2
    • OS/Arch: linux/arm64
    • Tools: k8s 1.26.0
@Joxit Joxit closed this as completed in de6d09c Oct 7, 2023
@Joxit
Copy link
Owner

Joxit commented Oct 7, 2023

Hi, thank you for using my project and posting issues 😄

@plevart Your bug has been confirmed. It seems that it's not only when deleting images but refreshing too. Should be fixed in 2.5.4.

@tranlybuu Your question looks like one of the FAQ questions, you pushed the same image with differents tags right ? So they are sharing the same SHA.

  • Why when I delete one tag, all tags with the same SHA are deleted ?
    • This a docker registry API limitation, there is only one way to delete images with tag, it's by its name and its manifest (it's a sha of the content). So when you delete a tag, this will delete all tags of this image with the same SHA/manifest.

@plevart
Copy link
Author

plevart commented Oct 8, 2023

Thanks @Joxit , I can confirm that with 2.5.4 it works as expected.

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