Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-34566

Deleting an image tag deletes all tags with the same digest from other images

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.41.0
    • Fix Version/s: None
    • Component/s: Docker
    • Labels:
    • Notability:
      3

      Description

      Problem:

      Deleting an image tag deletes all tags with the same digest from other images

      Reproduce:

      1.) create a docker-hosted repository in Nexus Repo 3.41.0. Assume the access URL of the docker repository is 10.0.0.195:19000

      2.) pull an image from docker hub: 

      docker pull alpine:3.10
      

      3.) Tag the image with different tags and push them to the repository created in 1.)

      nexus_registry=10.0.0.195:19000 
      docker tag alpine:3.10 $nexus_registry/com/example/ecr_not_exist:1.0.0 && docker push $nexus_registry/com/example/ecr_not_exist:1.0.0 
      docker tag alpine:3.10 $nexus_registry/com/example/immutable:digest_diff && docker push $nexus_registry/com/example/immutable:digest_diff 
      docker tag alpine:3.10 $nexus_registry/com/example/happy_path:1.2.0 && docker push $nexus_registry/com/example/happy_path:1.2.0 
      docker tag alpine:3.10 $nexus_registry/com/example/happy_path:digest_diff_overwrite && docker push $nexus_registry/com/example/happy_path:digest_diff_overwrite 
      docker tag alpine:3.10 $nexus_registry/com/example/diff_no_overwrite:diff_no_overwrite 
      && docker push $nexus_registry/com/example/diff_no_overwrite:diff_no_overwrite
      

      4.) install the tool skopeo from https://github.com/containers/skopeo

      5.) Run the below commands:

      skopeo login --tls-verify=false -u admin 10.0.0.195:19000
      skopeo delete --tls-verify=false docker://10.0.0.195:19000/com/example/happy_path:1.2.0
      

      6.) Result(which is wrong):

      From the Nexus Repo 3 UI, not just the tags in com/example/happy_path were deleted, but also the tags in com/example/ecr_not_existcom/example/immutable and com/example/diff_no_overwrite were also deleted

      Compare with private docker registry:

      Install a private docker registry with https://hub.docker.com/_/registry

      Repeat the steps in Reproduce.

      Only the tags in com/example/happy_path were deleted

      Expected behavior

      Deleting an image tag should not delete tags in other images, even the tags have the same digest

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dqiu Daolong Qiu
            Last Updated By:
            Michael Oliverio Michael Oliverio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title